summaryrefslogtreecommitdiff
path: root/spec/factories/groups.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/groups.rb')
-rw-r--r--spec/factories/groups.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb
index bd6e37c1cef..859f381e4c1 100644
--- a/spec/factories/groups.rb
+++ b/spec/factories/groups.rb
@@ -4,7 +4,7 @@ FactoryBot.define do
factory :group, class: 'Group', parent: :namespace do
sequence(:name) { |n| "group#{n}" }
path { name.downcase.gsub(/\s/, '_') }
- type { 'Group' }
+ type { Group.sti_name }
owner { nil }
project_creation_level { ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS }
@@ -69,6 +69,20 @@ FactoryBot.define do
allow_descendants_override_disabled_shared_runners { true }
end
+ trait :disabled_and_unoverridable do
+ shared_runners_disabled
+ allow_descendants_override_disabled_shared_runners { false }
+ end
+
+ trait :disabled_with_override do
+ shared_runners_disabled
+ allow_descendants_override_disabled_shared_runners
+ end
+
+ trait :shared_runners_enabled do
+ shared_runners_enabled { true }
+ end
+
# Construct a hierarchy underneath the group.
# Each group will have `children` amount of children,
# and `depth` levels of descendants.