diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/models/application_setting_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r-- | spec/models/application_setting_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index fd86a784b2d..1454c82c531 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -125,6 +125,8 @@ RSpec.describe ApplicationSetting do it { is_expected.to validate_numericality_of(:max_yaml_depth).only_integer.is_greater_than(0) } it { is_expected.to validate_presence_of(:max_pages_size) } it { is_expected.to validate_presence_of(:max_pages_custom_domains_per_project) } + it { is_expected.to validate_presence_of(:max_terraform_state_size_bytes) } + it { is_expected.to validate_numericality_of(:max_terraform_state_size_bytes).only_integer.is_greater_than_or_equal_to(0) } it 'ensures max_pages_size is an integer greater than 0 (or equal to 0 to indicate unlimited/maximum)' do is_expected.to validate_numericality_of(:max_pages_size).only_integer.is_greater_than_or_equal_to(0) @@ -214,6 +216,10 @@ RSpec.describe ApplicationSetting do it { is_expected.to allow_value(http).for(:jira_connect_proxy_url) } it { is_expected.to allow_value(https).for(:jira_connect_proxy_url) } + it { is_expected.to allow_value(true).for(:bulk_import_enabled) } + it { is_expected.to allow_value(false).for(:bulk_import_enabled) } + it { is_expected.not_to allow_value(nil).for(:bulk_import_enabled) } + context 'when deactivate_dormant_users is enabled' do before do stub_application_setting(deactivate_dormant_users: true) @@ -1283,11 +1289,10 @@ RSpec.describe ApplicationSetting do end end - describe '#instance_review_permitted?', :request_store, :use_clean_rails_memory_store_caching do + describe '#instance_review_permitted?', :request_store, :use_clean_rails_memory_store_caching, :without_license do subject { setting.instance_review_permitted? } before do - allow(License).to receive(:current).and_return(nil) if Gitlab.ee? allow(Rails.cache).to receive(:fetch).and_call_original expect(Rails.cache).to receive(:fetch).with('limited_users_count', anything).and_return( ::ApplicationSetting::INSTANCE_REVIEW_MIN_USERS + users_over_minimum |