debian-mirror-gitlab/spec/factories/releases.rb

25 lines
495 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
2015-11-26 14:37:03 +05:30
factory :release do
2019-12-21 20:55:43 +05:30
tag { "v1.1.0" }
sha { 'b83d6e391c22777fca1ed3012fce84f633d7fed0' }
2019-02-15 15:39:39 +05:30
name { tag }
2019-12-21 20:55:43 +05:30
description { "Awesome release" }
2017-09-10 17:25:29 +05:30
project
2019-02-15 15:39:39 +05:30
author
2019-09-30 21:07:59 +05:30
released_at { Time.zone.parse('2018-10-20T18:00:00Z') }
2019-02-15 15:39:39 +05:30
trait :legacy do
2019-12-21 20:55:43 +05:30
sha { nil }
author { nil }
2019-02-15 15:39:39 +05:30
end
2020-01-01 13:55:28 +05:30
trait :with_evidence do
after(:create) do |release, _|
create(:evidence, release: release)
end
end
2015-11-26 14:37:03 +05:30
end
end