diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2016-02-02 17:51:48 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-04 12:13:58 +0300 |
commit | 020623f3bbdb25c07e31985f0fe072988ba0eff2 (patch) | |
tree | d4a215cf7faaf6404964fdfed05d85f44bb5ee9a /spec/factories/ci | |
parent | 3b080be3e0de27d418423917a52c6c5199968192 (diff) |
Improve CI API specs related to operations on build
Conflicts:
spec/factories/ci/builds.rb
Diffstat (limited to 'spec/factories/ci')
-rw-r--r-- | spec/factories/ci/builds.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/factories/ci/builds.rb b/spec/factories/ci/builds.rb index d2db77f6286..f0ae3a18561 100644 --- a/spec/factories/ci/builds.rb +++ b/spec/factories/ci/builds.rb @@ -65,5 +65,20 @@ FactoryGirl.define do build.trace = 'BUILD TRACE' end end + + trait :artifacts do + after(:create) do |build, _| + build.artifacts_file = + fixture_file_upload(Rails.root + + 'spec/fixtures/ci_build_artifacts.zip', + 'application/zip') + + build.artifacts_metadata = + fixture_file_upload(Rails.root + + 'spec/fixtures/ci_build_artifacts_metadata.gz', + 'application/x-gzip') + build.save! + end + end end end |