Commit 65d634706cf833fc4b0b2f263f9d8fb35219858e

Authored by Robert Speicher
1 parent 046773d6

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`.
... ...