diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-07-19 18:27:11 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-07-19 18:27:11 +0900 |
commit | a2cda62fb922184aaf0e78699e06846c96565e0d (patch) | |
tree | 0e48d77d8efd0c9fb98ea8eeb32ab8a7a28af62c | |
parent | 95502e605af9bcf1a61dbeb26f9be4d181f8a7ba (diff) | |
download | gitlab-ce-a2cda62fb922184aaf0e78699e06846c96565e0d.tar.gz |
Fix presenter spec
-rw-r--r-- | app/presenters/ci/build_presenter.rb | 4 | ||||
-rw-r--r-- | spec/presenters/ci/build_presenter_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/presenters/ci/build_presenter.rb b/app/presenters/ci/build_presenter.rb index c4e0baa0603..d9650589f4c 100644 --- a/app/presenters/ci/build_presenter.rb +++ b/app/presenters/ci/build_presenter.rb @@ -56,7 +56,7 @@ module Ci def config_artifacts_archive(artifacts) artifacts.merge(type: :archive, format: :zip) - end + end def config_artifacts_reports(reports) list = [] @@ -67,7 +67,7 @@ module Ci end def config_artifacts_reports_junit(junit) - { name: 'junit.xml', paths: junit, type: :junit, format: :gzip } + { name: 'junit.xml', paths: junit, type: :junit, format: :gzip, when: :always } end end end diff --git a/spec/presenters/ci/build_presenter_spec.rb b/spec/presenters/ci/build_presenter_spec.rb index 78d00c4e14a..08fd35ccf4f 100644 --- a/spec/presenters/ci/build_presenter_spec.rb +++ b/spec/presenters/ci/build_presenter_spec.rb @@ -266,7 +266,7 @@ describe Ci::BuildPresenter do let(:build) { create(:ci_build, options: { artifacts: { reports: { junit: ['junit.xml'] } } } ) } it 'presents artifacts hash' do - expect(presenter.config_artifacts).to include({ type: :junit, format: :gzip, paths: ['junit.xml'] }) + expect(presenter.config_artifacts).to include({ name: 'junit.xml', type: :junit, format: :gzip, paths: ['junit.xml'], when: :always }) end end @@ -275,7 +275,7 @@ describe Ci::BuildPresenter do it 'presents artifacts hash' do expect(presenter.config_artifacts).to include( - { type: :junit, format: :gzip, paths: ['junit.xml'] }, + { name: 'junit.xml', type: :junit, format: :gzip, paths: ['junit.xml'], when: :always }, { type: :archive, format: :zip, paths: ['sample.txt'] }) end end |