diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-30 01:37:24 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-02-02 00:02:03 +0300 |
commit | e48a1755f42eabb2f459028d10d2d6c1160af4af (patch) | |
tree | 38bced3a3d7fc55f70df01e1804260536b37f28d /spec/finders/contributed_projects_finder_spec.rb | |
parent | b525aff665f139cd12ac5a6df78d722427e759cc (diff) |
Add traits for the different Event types to the Event factory
Diffstat (limited to 'spec/finders/contributed_projects_finder_spec.rb')
-rw-r--r-- | spec/finders/contributed_projects_finder_spec.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/finders/contributed_projects_finder_spec.rb b/spec/finders/contributed_projects_finder_spec.rb index ad2d456529a..34f665826b6 100644 --- a/spec/finders/contributed_projects_finder_spec.rb +++ b/spec/finders/contributed_projects_finder_spec.rb @@ -10,15 +10,12 @@ describe ContributedProjectsFinder do let!(:private_project) { create(:empty_project, :private) } before do - private_project.team << [source_user, Gitlab::Access::MASTER] - private_project.team << [current_user, Gitlab::Access::DEVELOPER] - public_project.team << [source_user, Gitlab::Access::MASTER] + private_project.add_master(source_user) + private_project.add_developer(current_user) + public_project.add_master(source_user) - create(:event, action: Event::PUSHED, project: public_project, - target: public_project, author: source_user) - - create(:event, action: Event::PUSHED, project: private_project, - target: private_project, author: source_user) + create(:event, :pushed, project: public_project, target: public_project, author: source_user) + create(:event, :pushed, project: private_project, target: private_project, author: source_user) end describe 'without a current user' do |