diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 03:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 03:08:09 +0300 |
commit | f6e2f302412fcb32b644b379778964791789cb62 (patch) | |
tree | 29ed98fca33be12adc21ee75185a459c668fb7da /spec/controllers | |
parent | 95ad46159e4cd93f2b31838199180d824e041994 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin/application_settings_controller_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index f28465f0555..ea51f3fcdf4 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -104,6 +104,22 @@ describe Admin::ApplicationSettingsController do expect(ApplicationSetting.current.minimum_password_length).to eq(10) end + it 'updates namespace_storage_size_limit setting' do + put :update, params: { application_setting: { namespace_storage_size_limit: '100' } } + + expect(response).to redirect_to(general_admin_application_settings_path) + expect(response).to set_flash[:notice].to('Application settings saved successfully') + expect(ApplicationSetting.current.namespace_storage_size_limit).to eq(100) + end + + it 'does not accept an invalid namespace_storage_size_limit' do + put :update, params: { application_setting: { namespace_storage_size_limit: '-100' } } + + expect(response).to render_template(:general) + expect(assigns(:application_setting).errors[:namespace_storage_size_limit]).to be_present + expect(ApplicationSetting.current.namespace_storage_size_limit).not_to eq(-100) + end + context 'external policy classification settings' do let(:settings) do { |