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/services/application_settings/update_service_spec.rb')
-rw-r--r--spec/services/application_settings/update_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb
index 79d4fc67538..a05219a0a49 100644
--- a/spec/services/application_settings/update_service_spec.rb
+++ b/spec/services/application_settings/update_service_spec.rb
@@ -314,6 +314,15 @@ RSpec.describe ApplicationSettings::UpdateService do
end
end
+ context 'when default_branch_protection is updated' do
+ let(:expected) { ::Gitlab::Access::BranchProtection.protected_against_developer_pushes.stringify_keys }
+ let(:params) { { default_branch_protection: ::Gitlab::Access::PROTECTION_DEV_CAN_MERGE } }
+
+ it "updates default_branch_protection_defaults from the default_branch_protection param" do
+ expect { subject.execute }.to change { application_settings.default_branch_protection_defaults }.from({}).to(expected)
+ end
+ end
+
context 'when protected path settings are passed' do
let(:params) do
{