diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin/application_settings_controller_spec.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 84a1ce773a1..19b35a346b7 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -6,20 +6,23 @@ describe Admin::ApplicationSettingsController do let(:admin) { create(:admin) } before do - sign_in(admin) stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') end - describe 'PATCH #update' do + describe 'PUT #update' do + before do + sign_in(admin) + end + it 'updates the default_project_visibility for string value' do - patch :update, application_setting: { default_project_visibility: "20" } + put :update, application_setting: { default_project_visibility: "20" } expect(response).to redirect_to(admin_application_settings_path) expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PUBLIC end it 'falls back to default with default_project_visibility setting is omitted' do - patch :update, application_setting: {} + put :update, application_setting: {} expect(response).to redirect_to(admin_application_settings_path) expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PRIVATE |