Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController

This commit is contained in:
Mark Fletcher 2018-01-19 12:04:45 +00:00
parent ee58763158
commit 6dcba97c83
3 changed files with 13 additions and 0 deletions

View file

@ -201,6 +201,7 @@ module ApplicationSettingsHelper
:metrics_sample_interval,
:metrics_timeout,
:password_authentication_enabled_for_web,
:password_authentication_enabled_for_git,
:performance_bar_allowed_group_id,
:performance_bar_enabled,
:plantuml_enabled,

View file

@ -0,0 +1,5 @@
---
title: Permits 'password_authentication_enabled_for_git' parameter for ApplicationSettingsController
merge_request:
author:
type: fixed

View file

@ -51,6 +51,13 @@ describe Admin::ApplicationSettingsController do
sign_in(admin)
end
it 'updates the password_authentication_enabled_for_git setting' do
put :update, application_setting: { password_authentication_enabled_for_git: "0" }
expect(response).to redirect_to(admin_application_settings_path)
expect(ApplicationSetting.current.password_authentication_enabled_for_git).to eq(false)
end
it 'updates the default_project_visibility for string value' do
put :update, application_setting: { default_project_visibility: "20" }