summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2014-03-19 05:14:27 -0400
committerRobert Speicher <rspeicher@gmail.com>2014-03-19 05:14:27 -0400
commit65d634706cf833fc4b0b2f263f9d8fb35219858e (patch)
tree85c05ae5ab962381dfa142e3480769ca60e363ad
parent046773d6e53035599544de4f85906bf706eab7d1 (diff)
downloadgitlab-ce-65d634706cf833fc4b0b2f263f9d8fb35219858e.tar.gz
Add public/private/internal traits to :project Factory
-rw-r--r--spec/factories.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 7fc2b7c5e97..adde72d2e1e 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -32,6 +32,18 @@ FactoryGirl.define do
path { name.downcase.gsub(/\s/, '_') }
namespace
creator
+
+ trait :public do
+ visibility_level Gitlab::VisibilityLevel::PUBLIC
+ end
+
+ trait :internal do
+ visibility_level Gitlab::VisibilityLevel::INTERNAL
+ end
+
+ trait :private do
+ visibility_level Gitlab::VisibilityLevel::PRIVATE
+ end
end
# Generates a test repository from the repository stored under `spec/seed_project.tar.gz`.