diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-10-27 11:30:39 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-10-27 11:30:39 +0300 |
commit | 93532432dce129e9075ffa18bc99d77019f63eb2 (patch) | |
tree | 6ca07aa67ebf513a9bf7e4146fab06684ada4d35 /features/steps/dashboard | |
parent | d7476123852a7164b63e097b4aac73b04d1eca5c (diff) |
Failing feature for dashboard merge requests when user has authored issues on forked project source.
Diffstat (limited to 'features/steps/dashboard')
-rw-r--r-- | features/steps/dashboard/merge_requests.rb | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/features/steps/dashboard/merge_requests.rb b/features/steps/dashboard/merge_requests.rb index 95c378fa201..64ba04079e6 100644 --- a/features/steps/dashboard/merge_requests.rb +++ b/features/steps/dashboard/merge_requests.rb @@ -10,6 +10,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps step 'I should see merge requests authored by me' do should_see(authored_merge_request) + should_see(authored_merge_request_from_fork) should_not_see(assigned_merge_request) should_not_see(other_merge_request) end @@ -22,6 +23,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps step 'I have authored merge requests' do authored_merge_request + authored_merge_request_from_fork end step 'I have assigned merge requests' do @@ -57,11 +59,26 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps end def authored_merge_request - @authored_merge_request ||= create :merge_request, source_branch: 'simple_merge_request', author: current_user, target_project: project, source_project: project + @authored_merge_request ||= create :merge_request, + source_branch: 'simple_merge_request', + author: current_user, + target_project: project, + source_project: project end def other_merge_request - @other_merge_request ||= create :merge_request, source_branch: '2_3_notes_fix', target_project: project, source_project: project + @other_merge_request ||= create :merge_request, + source_branch: '2_3_notes_fix', + target_project: project, + source_project: project + end + + def authored_merge_request_from_fork + @authored_merge_request_from_fork ||= create :merge_request, + source_branch: 'basic_page', + author: current_user, + target_project: public_project, + source_project: forked_project end def project @@ -71,4 +88,12 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps project end end + + def public_project + @public_project ||= create :project, :public + end + + def forked_project + @forked_project ||= Projects::ForkService.new(public_project, current_user).execute + end end |