diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/helpers/container_expiration_policies_helper_spec.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/helpers/container_expiration_policies_helper_spec.rb')
-rw-r--r-- | spec/helpers/container_expiration_policies_helper_spec.rb | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/spec/helpers/container_expiration_policies_helper_spec.rb b/spec/helpers/container_expiration_policies_helper_spec.rb index acb6b017d2c..704e63730c8 100644 --- a/spec/helpers/container_expiration_policies_helper_spec.rb +++ b/spec/helpers/container_expiration_policies_helper_spec.rb @@ -3,8 +3,6 @@ require 'spec_helper' RSpec.describe ContainerExpirationPoliciesHelper do - using RSpec::Parameterized::TableSyntax - describe '#keep_n_options' do it 'returns keep_n options formatted for dropdown usage' do expected_result = [ @@ -51,23 +49,22 @@ RSpec.describe ContainerExpirationPoliciesHelper do describe '#container_expiration_policies_historic_entry_enabled?' do let_it_be(:project) { build_stubbed(:project) } - subject { helper.container_expiration_policies_historic_entry_enabled?(project) } + subject { helper.container_expiration_policies_historic_entry_enabled? } + + context 'when the application setting is enabled' do + before do + stub_application_setting(container_expiration_policies_enable_historic_entries: true) + end - where(:application_setting, :feature_flag, :expected_result) do - true | true | true - true | false | true - false | true | true - false | false | false + it { is_expected.to be_truthy } end - with_them do + context 'when the application setting is disabled' do before do - stub_feature_flags(container_expiration_policies_historic_entry: false) - stub_application_setting(container_expiration_policies_enable_historic_entries: application_setting) - stub_feature_flags(container_expiration_policies_historic_entry: project) if feature_flag + stub_application_setting(container_expiration_policies_enable_historic_entries: false) end - it { is_expected.to eq(expected_result) } + it { is_expected.to be_falsey } end end end |