diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-25 14:52:12 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-01-25 14:52:12 -0500 |
commit | c1743ba4c4d838e95bed0d3e74e48a191684c4bf (patch) | |
tree | 761bfee8ecda4b6de1f3c42ab049885d2065c25f /features | |
parent | d0315d5393426bffa6f4e3b84c22d3ef6b0dd54f (diff) | |
download | gitlab-ce-c1743ba4c4d838e95bed0d3e74e48a191684c4bf.tar.gz |
Use a project factory with a repository where necessaryrs-empty_project-for-associations
Diffstat (limited to 'features')
-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 |