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.
This commit is contained in:
parent
3918c303b9
commit
7bfa523485
|
@ -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…
Reference in New Issue