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/requests/api/settings_spec.rb')
-rw-r--r--spec/requests/api/settings_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index ad52076523c..2fdcf710471 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -85,6 +85,8 @@ RSpec.describe API::Settings, 'Settings', :do_not_mock_admin_mode_setting, featu
expect(json_response['gitlab_shell_operation_limit']).to eq(600)
expect(json_response['namespace_aggregation_schedule_lease_duration_in_seconds']).to eq(300)
expect(json_response['default_branch_protection_defaults']).to be_kind_of(Hash)
+ expect(json_response['max_login_attempts']).to be_nil
+ expect(json_response['failed_login_attempts_unlock_period_in_minutes']).to be_nil
end
end
@@ -1046,5 +1048,19 @@ RSpec.describe API::Settings, 'Settings', :do_not_mock_admin_mode_setting, featu
end
end
end
+
+ context 'login attempts lock settings' do
+ it 'updates the settings' do
+ put(
+ api("/application/settings", admin),
+ params: { max_login_attempts: 3,
+ failed_login_attempts_unlock_period_in_minutes: 30 }
+ )
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response['max_login_attempts']).to eq(3)
+ expect(json_response['failed_login_attempts_unlock_period_in_minutes']).to eq(30)
+ end
+ end
end
end