summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-11-11 12:51:50 +0000
committerNick Thomas <nick@gitlab.com>2016-11-11 15:45:47 +0000
commitd211011698016bd4f04bc32e7450d6df470ea0c2 (patch)
treebf6a1309c933dbff7c1c16ee3ee6ee199d8bffbd /spec/factories
parent64d2eff9ccf716395d101f2ac91db44c47d7394e (diff)
downloadgitlab-ce-d211011698016bd4f04bc32e7450d6df470ea0c2.tar.gz
Make access request specs explicitly enable or disable access requests as required
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/groups.rb4
-rw-r--r--spec/factories/projects.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb
index 2d47a6f6c4c..ebd3595ea64 100644
--- a/spec/factories/groups.rb
+++ b/spec/factories/groups.rb
@@ -15,5 +15,9 @@ FactoryGirl.define do
trait :private do
visibility_level Gitlab::VisibilityLevel::PRIVATE
end
+
+ trait :access_requestable do
+ request_access_enabled true
+ end
end
end
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index bfd88a254f1..1166498ddff 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -24,6 +24,10 @@ FactoryGirl.define do
visibility_level Gitlab::VisibilityLevel::PRIVATE
end
+ trait :access_requestable do
+ request_access_enabled true
+ end
+
trait :empty_repo do
after(:create) do |project|
project.create_repository