diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/controllers/admin/application_settings_controller_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/controllers/admin/application_settings_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin/application_settings_controller_spec.rb | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 7b8528009d8..4f223811be8 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -105,22 +105,6 @@ RSpec.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 - it 'updates repository_storages_weighted setting' do put :update, params: { application_setting: { repository_storages_weighted_default: 75 } } @@ -158,23 +142,12 @@ RSpec.describe Admin::ApplicationSettingsController do end describe 'verify panel actions' do - before do - stub_feature_flags(instance_level_integrations: false) - end - Admin::ApplicationSettingsController::VALID_SETTING_PANELS.each do |valid_action| it_behaves_like 'renders correct panels' do let(:action) { valid_action } end end end - end - - describe 'PATCH #integrations' do - before do - stub_feature_flags(instance_level_integrations: false) - sign_in(admin) - end describe 'EKS integration' do let(:application_setting) { ApplicationSetting.current } @@ -188,7 +161,7 @@ RSpec.describe Admin::ApplicationSettingsController do end it 'updates EKS settings' do - patch :integrations, params: { application_setting: settings_params } + put :update, params: { application_setting: settings_params } expect(application_setting.eks_integration_enabled).to be_truthy expect(application_setting.eks_account_id).to eq '123456789012' @@ -202,7 +175,7 @@ RSpec.describe Admin::ApplicationSettingsController do it 'does not update the secret key' do application_setting.update!(eks_secret_access_key: 'dummy secret key') - patch :integrations, params: { application_setting: settings_params } + put :update, params: { application_setting: settings_params } expect(application_setting.reload.eks_secret_access_key).to eq 'dummy secret key' end |