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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-05 15:08:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-05 15:08:19 +0300
commit12b995e0e7aace4b7695c4424aed71b053c2c2a6 (patch)
tree0f2c9a902693aa5b7c9265c3ed24e842eedb6a96 /spec/policies
parent1e02d1c756e1b5e79453fcc805c9737bb6520fca (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/group_policy_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb
index 8cf121342a3..65abb43b6c4 100644
--- a/spec/policies/group_policy_spec.rb
+++ b/spec/policies/group_policy_spec.rb
@@ -1191,12 +1191,28 @@ RSpec.describe GroupPolicy do
context 'when admin mode is enabled', :enable_admin_mode do
it { is_expected.to be_allowed(:register_group_runners) }
+ context 'with specific group runner registration disabled' do
+ before do
+ group.runner_registration_enabled = false
+ end
+
+ it { is_expected.to be_allowed(:register_group_runners) }
+ end
+
context 'with group runner registration disabled' do
before do
stub_application_setting(valid_runner_registrars: ['project'])
end
it { is_expected.to be_allowed(:register_group_runners) }
+
+ context 'with specific group runner registration disabled' do
+ before do
+ group.runner_registration_enabled = false
+ end
+
+ it { is_expected.to be_allowed(:register_group_runners) }
+ end
end
end
@@ -1217,6 +1233,14 @@ RSpec.describe GroupPolicy do
it { is_expected.to be_disallowed(:register_group_runners) }
end
+
+ context 'with specific group runner registration disabled' do
+ before do
+ group.runner_registration_enabled = false
+ end
+
+ it { is_expected.to be_disallowed(:register_group_runners) }
+ end
end
context 'with maintainer' do