diff --git a/ee/spec/models/application_setting_spec.rb b/ee/spec/models/application_setting_spec.rb index 379ae957206c69c65f813517155a40c04ebd52f5..fd2a22db34bf1a9e65d34adba4b0f70a8e7877c3 100644 --- a/ee/spec/models/application_setting_spec.rb +++ b/ee/spec/models/application_setting_spec.rb @@ -92,8 +92,7 @@ it { is_expected.to allow_value('a' * 255).for(:elasticsearch_username) } it { is_expected.not_to allow_value('a' * 256).for(:elasticsearch_username) } - it { is_expected.to allow_value(true).for(:security_policy_global_group_approvers_enabled) } - it { is_expected.to allow_value(false).for(:security_policy_global_group_approvers_enabled) } + it { is_expected.to allow_value(true, false).for(:security_policy_global_group_approvers_enabled) } it { is_expected.not_to allow_value(nil).for(:security_policy_global_group_approvers_enabled) } end @@ -151,13 +150,11 @@ it { is_expected.to validate_numericality_of(:dashboard_limit).only_integer.is_greater_than_or_equal_to(0) } it { is_expected.to validate_numericality_of(:dashboard_notification_limit).only_integer.is_greater_than_or_equal_to(0) } it { is_expected.to validate_numericality_of(:dashboard_enforcement_limit).only_integer.is_greater_than_or_equal_to(0) } - it { is_expected.to allow_value(true).for(:dashboard_limit_enabled) } - it { is_expected.to allow_value(false).for(:dashboard_limit_enabled) } + it { is_expected.to allow_value(true, false).for(:dashboard_limit_enabled) } it { is_expected.not_to allow_value(nil).for(:dashboard_limit_enabled) } end - it { is_expected.to allow_value(true).for(:allow_account_deletion) } - it { is_expected.to allow_value(false).for(:allow_account_deletion) } + it { is_expected.to allow_value(true, false).for(:allow_account_deletion) } it { is_expected.not_to allow_value(nil).for(:allow_account_deletion) } describe 'when additional email text is enabled', feature_category: :user_profile do @@ -1238,8 +1235,7 @@ def expect_is_es_licensed expect(setting.lock_delayed_project_removal).to be false end - it { is_expected.to allow_value(false).for(:delayed_project_removal) } - it { is_expected.to allow_value(true).for(:delayed_project_removal) } + it { is_expected.to allow_value(true, false).for(:delayed_project_removal) } end end diff --git a/ee/spec/models/namespace_setting_spec.rb b/ee/spec/models/namespace_setting_spec.rb index a28f03f7bdee6cb1135e40644c6bfc4e24e87f87..d1b00a035ef4256eb0a449c96ccc177ed3464ec2 100644 --- a/ee/spec/models/namespace_setting_spec.rb +++ b/ee/spec/models/namespace_setting_spec.rb @@ -53,8 +53,7 @@ allow(subject).to receive(:ai_settings_allowed?).and_return(true) end - it { is_expected.to allow_value(false).for(attr) } - it { is_expected.to allow_value(true).for(attr) } + it { is_expected.to allow_value(true, false).for(attr) } it { is_expected.not_to allow_value(nil).for(attr) } context 'when AI settings are not allowed' do @@ -80,8 +79,7 @@ allow(subject).to receive(:ai_assist_ui_enabled?).and_return(true) end - it { is_expected.to allow_value(false).for(:third_party_ai_features_enabled) } - it { is_expected.to allow_value(true).for(:third_party_ai_features_enabled) } + it { is_expected.to allow_value(true, false).for(:third_party_ai_features_enabled) } it { is_expected.not_to allow_value(nil).for(:third_party_ai_features_enabled) } end end diff --git a/ee/spec/models/vulnerabilities/read_spec.rb b/ee/spec/models/vulnerabilities/read_spec.rb index e25eaca6cce5dacb6886a2f8927a868cc11335a7..10a95dd1519e362a962e128020ff6bab2442ae11 100644 --- a/ee/spec/models/vulnerabilities/read_spec.rb +++ b/ee/spec/models/vulnerabilities/read_spec.rb @@ -26,12 +26,10 @@ it { is_expected.to validate_uniqueness_of(:vulnerability_id) } it { is_expected.to validate_uniqueness_of(:uuid).case_insensitive } - it { is_expected.to allow_value(true).for(:has_issues) } - it { is_expected.to allow_value(false).for(:has_issues) } + it { is_expected.to allow_value(true, false).for(:has_issues) } it { is_expected.not_to allow_value(nil).for(:has_issues) } - it { is_expected.to allow_value(true).for(:resolved_on_default_branch) } - it { is_expected.to allow_value(false).for(:resolved_on_default_branch) } + it { is_expected.to allow_value(true, false).for(:resolved_on_default_branch) } it { is_expected.not_to allow_value(nil).for(:resolved_on_default_branch) } end diff --git a/spec/models/container_expiration_policy_spec.rb b/spec/models/container_expiration_policy_spec.rb index b88eddf19dcbfacdc201bf59505bcfca0aeb82fe..e5f9fdd410e778ef0887f53d5c73b834eafa798a 100644 --- a/spec/models/container_expiration_policy_spec.rb +++ b/spec/models/container_expiration_policy_spec.rb @@ -11,8 +11,7 @@ it { is_expected.to validate_presence_of(:project) } describe '#enabled' do - it { is_expected.to allow_value(true).for(:enabled) } - it { is_expected.to allow_value(false).for(:enabled) } + it { is_expected.to allow_value(true, false).for(:enabled) } it { is_expected.not_to allow_value(nil).for(:enabled) } end diff --git a/spec/models/dependency_proxy/image_ttl_group_policy_spec.rb b/spec/models/dependency_proxy/image_ttl_group_policy_spec.rb index 9f6358e128695aa8325a00787a97cc7691f9f8b4..a58e8df45e4b3fe9f3b0a5dad4e87fb1cb0f77fd 100644 --- a/spec/models/dependency_proxy/image_ttl_group_policy_spec.rb +++ b/spec/models/dependency_proxy/image_ttl_group_policy_spec.rb @@ -11,8 +11,7 @@ it { is_expected.to validate_presence_of(:group) } describe '#enabled' do - it { is_expected.to allow_value(true).for(:enabled) } - it { is_expected.to allow_value(false).for(:enabled) } + it { is_expected.to allow_value(true, false).for(:enabled) } it { is_expected.not_to allow_value(nil).for(:enabled) } end diff --git a/spec/models/integrations/apple_app_store_spec.rb b/spec/models/integrations/apple_app_store_spec.rb index f3346acae0a8591e0349348a89fb199cc8b85fab..9864fe38d3fca94db7f7dbede305dfdcaeadc5a9 100644 --- a/spec/models/integrations/apple_app_store_spec.rb +++ b/spec/models/integrations/apple_app_store_spec.rb @@ -13,8 +13,7 @@ it { is_expected.to validate_presence_of :app_store_key_id } it { is_expected.to validate_presence_of :app_store_private_key } it { is_expected.to validate_presence_of :app_store_private_key_file_name } - it { is_expected.to allow_value(true).for(:app_store_protected_refs) } - it { is_expected.to allow_value(false).for(:app_store_protected_refs) } + it { is_expected.to allow_value(true, false).for(:app_store_protected_refs) } it { is_expected.not_to allow_value(nil).for(:app_store_protected_refs) } it { is_expected.to allow_value('aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee').for(:app_store_issuer_id) } it { is_expected.not_to allow_value('abcde').for(:app_store_issuer_id) } diff --git a/spec/models/namespace/package_setting_spec.rb b/spec/models/namespace/package_setting_spec.rb index 72ecad42a70b46304608b2d7830adf684f65ac4f..9dfb58301b1049fd65264c4e6b2f2cd988c47a9d 100644 --- a/spec/models/namespace/package_setting_spec.rb +++ b/spec/models/namespace/package_setting_spec.rb @@ -11,11 +11,9 @@ it { is_expected.to validate_presence_of(:namespace) } describe '#maven_duplicates_allowed' do - it { is_expected.to allow_value(true).for(:maven_duplicates_allowed) } - it { is_expected.to allow_value(false).for(:maven_duplicates_allowed) } + it { is_expected.to allow_value(true, false).for(:maven_duplicates_allowed) } it { is_expected.not_to allow_value(nil).for(:maven_duplicates_allowed) } - it { is_expected.to allow_value(true).for(:generic_duplicates_allowed) } - it { is_expected.to allow_value(false).for(:generic_duplicates_allowed) } + it { is_expected.to allow_value(true, false).for(:generic_duplicates_allowed) } it { is_expected.not_to allow_value(nil).for(:generic_duplicates_allowed) } end diff --git a/spec/models/project_setting_spec.rb b/spec/models/project_setting_spec.rb index 4b2760d7699c8c9b72fb545e4a6b23d6bdbcdbe8..6928cc8ba0832127e94085201a81b2f171171fd4 100644 --- a/spec/models/project_setting_spec.rb +++ b/spec/models/project_setting_spec.rb @@ -27,8 +27,7 @@ it { is_expected.to validate_length_of(:issue_branch_template).is_at_most(255) } it { is_expected.not_to allow_value(nil).for(:suggested_reviewers_enabled) } - it { is_expected.to allow_value(true).for(:suggested_reviewers_enabled) } - it { is_expected.to allow_value(false).for(:suggested_reviewers_enabled) } + it { is_expected.to allow_value(true, false).for(:suggested_reviewers_enabled) } it 'allows any combination of the allowed target platforms' do valid_target_platform_combinations.each do |target_platforms| diff --git a/spec/models/user_preference_spec.rb b/spec/models/user_preference_spec.rb index 17899012aaa1e6cb85b38a8c1dc4d42d526c22f4..729635b5a27f14bb082c489607e873587191b6a6 100644 --- a/spec/models/user_preference_spec.rb +++ b/spec/models/user_preference_spec.rb @@ -49,8 +49,7 @@ end describe 'pass_user_identities_to_ci_jwt' do - it { is_expected.to allow_value(true).for(:pass_user_identities_to_ci_jwt) } - it { is_expected.to allow_value(false).for(:pass_user_identities_to_ci_jwt) } + it { is_expected.to allow_value(true, false).for(:pass_user_identities_to_ci_jwt) } it { is_expected.not_to allow_value(nil).for(:pass_user_identities_to_ci_jwt) } it { is_expected.not_to allow_value("").for(:pass_user_identities_to_ci_jwt) } end