Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-10-22 11:09:40 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-10-22 11:09:40 +0300
commit44a9231d19f88c5551f7184917ddc4bba13e7d00 (patch)
tree8c519413eb3d9576d2a9179619cc102485a26e0e /spec/presenters
parentfbb0f71237fca77746e84ba4cea837472a178f4d (diff)
parent15cd91c71a57a0b84af620181a64b26d5aec8237 (diff)
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.rb32
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