diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-09-13 09:00:50 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-09-13 09:00:50 +0000 |
commit | da4ca9f44caaa3876d2b6d2021366d2d0e035241 (patch) | |
tree | f5ed3b81129c41c6d9bdcec6bf91068a73bfef73 /spec/helpers | |
parent | e19827ab3b9979324b978422978518d86ba3b3a9 (diff) | |
parent | b1d5186d0a2d8ea2b594398fbcfe28acb3e8ed23 (diff) | |
download | gitlab-ce-da4ca9f44caaa3876d2b6d2021366d2d0e035241.tar.gz |
Merge branch 'zj-feature-flipper-disable-banner' into 'master'
Allow all AutoDevOps banners to be disabled
Closes #37653
See merge request !14218
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/auto_devops_helper_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/auto_devops_helper_spec.rb b/spec/helpers/auto_devops_helper_spec.rb index b6d892548ef..80d58ff6bf7 100644 --- a/spec/helpers/auto_devops_helper_spec.rb +++ b/spec/helpers/auto_devops_helper_spec.rb @@ -10,6 +10,8 @@ describe AutoDevopsHelper do before do allow(helper).to receive(:can?).with(user, :admin_pipeline, project) { allowed } allow(helper).to receive(:current_user) { user } + + Feature.get(:auto_devops_banner_disabled).disable end subject { helper.show_auto_devops_callout?(project) } @@ -18,6 +20,14 @@ describe AutoDevopsHelper do it { is_expected.to eq(true) } end + context 'when the banner is disabled by feature flag' do + it 'allows the feature flag to disable' do + Feature.get(:auto_devops_banner_disabled).enable + + expect(subject).to be(false) + end + end + context 'when dismissed' do before do helper.request.cookies[:auto_devops_settings_dismissed] = 'true' |