diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/services/application_settings/update_service_spec.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/services/application_settings/update_service_spec.rb')
-rw-r--r-- | spec/services/application_settings/update_service_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb index 9d73a4a6cee..0b5ba1db9d4 100644 --- a/spec/services/application_settings/update_service_spec.rb +++ b/spec/services/application_settings/update_service_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -RSpec.describe ApplicationSettings::UpdateService do +RSpec.describe ApplicationSettings::UpdateService, feature_category: :shared do include ExternalAuthorizationServiceHelpers - let(:application_settings) { create(:application_setting) } + let(:application_settings) { ::Gitlab::CurrentSettings.current_application_settings } let(:admin) { create(:user, :admin) } let(:params) { {} } @@ -331,7 +331,8 @@ RSpec.describe ApplicationSettings::UpdateService do throttle_protected_paths_enabled: 1, throttle_protected_paths_period_in_seconds: 600, throttle_protected_paths_requests_per_period: 100, - protected_paths_raw: "/users/password\r\n/users/sign_in\r\n" + protected_paths_raw: "/users/password\r\n/users/sign_in\r\n", + protected_paths_for_get_request_raw: "/users/password\r\n/users/sign_up\r\n" } end @@ -344,6 +345,7 @@ RSpec.describe ApplicationSettings::UpdateService do expect(application_settings.throttle_protected_paths_period_in_seconds).to eq(600) expect(application_settings.throttle_protected_paths_requests_per_period).to eq(100) expect(application_settings.protected_paths).to eq(['/users/password', '/users/sign_in']) + expect(application_settings.protected_paths_for_get_request).to match_array(['/users/password', '/users/sign_up']) end end |