diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-03-06 16:53:22 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-03-06 16:53:22 -0500 |
commit | de944c914b2a780a5e968cc32ef64cddd2b82c9b (patch) | |
tree | dfef857b364ee0badb2b68ccf6e6a964a7f8df16 /spec/factories | |
parent | 042b047fc87ba4f76178383f9b5738cfbb9eb16c (diff) | |
download | gitlab-ce-de944c914b2a780a5e968cc32ef64cddd2b82c9b.tar.gz |
Add traits for each access_level to ProjectMember factory
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/project_members.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/factories/project_members.rb b/spec/factories/project_members.rb index 70fb7595c74..cf3659ba275 100644 --- a/spec/factories/project_members.rb +++ b/spec/factories/project_members.rb @@ -2,6 +2,26 @@ FactoryGirl.define do factory :project_member do user project - access_level { ProjectMember::MASTER } + master + + trait :guest do + access_level ProjectMember::GUEST + end + + trait :reporter do + access_level ProjectMember::REPORTER + end + + trait :developer do + access_level ProjectMember::DEVELOPER + end + + trait :master do + access_level ProjectMember::MASTER + end + + trait :owner do + access_level ProjectMember::OWNER + end end end |