diff options
Diffstat (limited to 'spec/presenters/ci/build_runner_presenter_spec.rb')
-rw-r--r-- | spec/presenters/ci/build_runner_presenter_spec.rb | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/spec/presenters/ci/build_runner_presenter_spec.rb b/spec/presenters/ci/build_runner_presenter_spec.rb index 9cb00781e99..4422773fec6 100644 --- a/spec/presenters/ci/build_runner_presenter_spec.rb +++ b/spec/presenters/ci/build_runner_presenter_spec.rb @@ -44,29 +44,13 @@ RSpec.describe Ci::BuildRunnerPresenter do create(:ci_build, options: { artifacts: { paths: %w[abc], exclude: %w[cde] } }) end - context 'when the feature is enabled' do - before do - stub_feature_flags(ci_artifacts_exclude: true) - end - - it 'includes the list of excluded paths' do - expect(presenter.artifacts.first).to include( - artifact_type: :archive, - artifact_format: :zip, - paths: %w[abc], - exclude: %w[cde] - ) - end - end - - context 'when the feature is disabled' do - before do - stub_feature_flags(ci_artifacts_exclude: false) - end - - it 'does not include the list of excluded paths' do - expect(presenter.artifacts.first).not_to have_key(:exclude) - end + it 'includes the list of excluded paths' do + expect(presenter.artifacts.first).to include( + artifact_type: :archive, + artifact_format: :zip, + paths: %w[abc], + exclude: %w[cde] + ) end end @@ -193,7 +177,7 @@ RSpec.describe Ci::BuildRunnerPresenter do end it 'uses a SHA in the persistent refspec' do - expect(subject[0]).to match(/^\+[0-9a-f]{40}:refs\/pipelines\/[0-9]+$/) + expect(subject[0]).to match(%r{^\+[0-9a-f]{40}:refs/pipelines/[0-9]+$}) end context 'when ref is tag' do |