Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/admin/application_settings_controller_spec.rb')
-rw-r--r--spec/controllers/admin/application_settings_controller_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb
index e02589ddc83..ab0cad989cb 100644
--- a/spec/controllers/admin/application_settings_controller_spec.rb
+++ b/spec/controllers/admin/application_settings_controller_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
let(:admin) { create(:admin) }
- let(:user) { create(:user)}
+ let(:user) { create(:user) }
before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
@@ -362,6 +362,17 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set
expect(application_settings.reload.pipeline_limit_per_project_user_sha).to eq(25)
end
end
+
+ context 'invitation flow enforcement setting' do
+ let(:application_settings) { ApplicationSetting.current }
+
+ it 'updates invitation_flow_enforcement setting' do
+ put :update, params: { application_setting: { invitation_flow_enforcement: true } }
+
+ expect(response).to redirect_to(general_admin_application_settings_path)
+ expect(application_settings.reload.invitation_flow_enforcement).to eq(true)
+ end
+ end
end
describe 'PUT #reset_registration_token' do