Commit 65d634706cf833fc4b0b2f263f9d8fb35219858e
1 parent
046773d6
Exists in
spb-stable
and in
3 other branches
Add public/private/internal traits to :project Factory
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
spec/factories.rb
... | ... | @@ -32,6 +32,18 @@ FactoryGirl.define do |
32 | 32 | path { name.downcase.gsub(/\s/, '_') } |
33 | 33 | namespace |
34 | 34 | creator |
35 | + | |
36 | + trait :public do | |
37 | + visibility_level Gitlab::VisibilityLevel::PUBLIC | |
38 | + end | |
39 | + | |
40 | + trait :internal do | |
41 | + visibility_level Gitlab::VisibilityLevel::INTERNAL | |
42 | + end | |
43 | + | |
44 | + trait :private do | |
45 | + visibility_level Gitlab::VisibilityLevel::PRIVATE | |
46 | + end | |
35 | 47 | end |
36 | 48 | |
37 | 49 | # Generates a test repository from the repository stored under `spec/seed_project.tar.gz`. | ... | ... |