diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-10-22 08:09:40 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-10-22 08:09:40 +0000 |
commit | 44a9231d19f88c5551f7184917ddc4bba13e7d00 (patch) | |
tree | 8c519413eb3d9576d2a9179619cc102485a26e0e /spec/presenters | |
parent | fbb0f71237fca77746e84ba4cea837472a178f4d (diff) | |
parent | 15cd91c71a57a0b84af620181a64b26d5aec8237 (diff) | |
download | gitlab-ce-44a9231d19f88c5551f7184917ddc4bba13e7d00.tar.gz |
Merge branch 'use-raw-file-format' into 'master'
Add RAW file format which is used to store security reports
Closes gitlab-ee#7996
See merge request gitlab-org/gitlab-ce!22365
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/ci/build_runner_presenter_spec.rb | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb index a42d1f3d399..170e0ac5717 100644 --- a/spec/presenters/ci/build_runner_presenter_spec.rb +++ b/spec/presenters/ci/build_runner_presenter_spec.rb @@ -40,21 +40,23 @@ describe Ci::BuildRunnerPresenter do context "with reports" do Ci::JobArtifact::DEFAULT_FILE_NAMES.each do |file_type, filename| - let(:report) { { "#{file_type}": [filename] } } - let(:build) { create(:ci_build, options: { artifacts: { reports: report } } ) } - - let(:report_expectation) do - { - name: filename, - artifact_type: :"#{file_type}", - artifact_format: :gzip, - paths: [filename], - when: 'always' - } - end - - it 'presents correct hash' do - expect(presenter.artifacts.first).to include(report_expectation) + context file_type.to_s do + let(:report) { { "#{file_type}": [filename] } } + let(:build) { create(:ci_build, options: { artifacts: { reports: report } } ) } + + let(:report_expectation) do + { + name: filename, + artifact_type: :"#{file_type}", + artifact_format: Ci::JobArtifact::TYPE_AND_FORMAT_PAIRS.fetch(file_type), + paths: [filename], + when: 'always' + } + end + + it 'presents correct hash' do + expect(presenter.artifacts.first).to include(report_expectation) + end end end end |