diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-25 22:52:12 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-01-25 22:52:12 +0300 |
commit | c1743ba4c4d838e95bed0d3e74e48a191684c4bf (patch) | |
tree | 761bfee8ecda4b6de1f3c42ab049885d2065c25f /features/steps/project/merge_requests | |
parent | d0315d5393426bffa6f4e3b84c22d3ef6b0dd54f (diff) |
Use a project factory with a repository where necessary
Diffstat (limited to 'features/steps/project/merge_requests')
-rw-r--r-- | features/steps/project/merge_requests/revert.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/features/steps/project/merge_requests/revert.rb b/features/steps/project/merge_requests/revert.rb index 3cc4fe9dafb..31f95b524b3 100644 --- a/features/steps/project/merge_requests/revert.rb +++ b/features/steps/project/merge_requests/revert.rb @@ -30,14 +30,13 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps end step 'I am signed in as a developer of the project' do + @user = create(:user) { |u| @project.add_developer(u) } login_as(@user) end step 'There is an open Merge Request' do - @user = create(:user) - @project = create(:project, :public, :repository) - @project_member = create(:project_member, :developer, user: @user, project: @project) - @merge_request = create(:merge_request, :with_diffs, :simple, source_project: @project) + @merge_request = create(:merge_request, :with_diffs, :simple) + @project = @merge_request.source_project end step 'I should see a revert error' do |