Commit 7bfa5234 authored by Toon Claes's avatar Toon Claes

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
...@@ -6,20 +6,23 @@ describe Admin::ApplicationSettingsController do ...@@ -6,20 +6,23 @@ describe Admin::ApplicationSettingsController do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
before do before do
sign_in(admin)
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
end 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 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(response).to redirect_to(admin_application_settings_path)
expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PUBLIC expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PUBLIC
end end
it 'falls back to default with default_project_visibility setting is omitted' do 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(response).to redirect_to(admin_application_settings_path)
expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PRIVATE expect(ApplicationSetting.current.default_project_visibility).to eq Gitlab::VisibilityLevel::PRIVATE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment