diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-23 18:57:27 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-03 14:04:49 +0300 |
commit | 871de0f18581bb03fed5c0d800f8183598a0195f (patch) | |
tree | 5b5ac2aadd2a7d58f5e4c845ee85141ee96241a3 /spec/factories/ci/builds.rb | |
parent | e2242cdf75d2734f78f694ab3191fcbb31947a6f (diff) |
Rename artifacts_* to legacy_artifacts_*
Diffstat (limited to 'spec/factories/ci/builds.rb')
-rw-r--r-- | spec/factories/ci/builds.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index 2ce49ede4fa..441f740e1e5 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -154,6 +154,17 @@ FactoryGirl.define do runner factory: :ci_runner end + trait :legacy_artifacts do + after(:create) do |build, _| + build.update!( + legacy_artifacts_file: fixture_file_upload( + Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), 'application/zip'), + legacy_artifacts_metadata: fixture_file_upload( + Rails.root.join('spec/fixtures/ci_build_artifacts_metadata.gz'), 'application/x-gzip') + ) + end + end + trait :artifacts do after(:create) do |build| create(:ci_job_artifact, job: build) |