Skip to content
Snippets Groups Projects
Commit 7bfa5234 authored by Toon Claes's avatar Toon Claes
Browse files

Resolve future conflicts with CE -> EE merge

EE already includes specs for the ApplicationSettingsController, so
ensure future changes will be easier to merge to EE.
parent 3918c303
No related branches found
No related tags found
1 merge request!10189Cleanup application settings spec
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment