Commit 93532432 authored by Marin Jankovski's avatar Marin Jankovski

Failing feature for dashboard merge requests when user has authored issues on...

Failing feature for dashboard merge requests when user has authored issues on forked project source.
parent d7476123
...@@ -10,6 +10,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps ...@@ -10,6 +10,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
step 'I should see merge requests authored by me' do step 'I should see merge requests authored by me' do
should_see(authored_merge_request) should_see(authored_merge_request)
should_see(authored_merge_request_from_fork)
should_not_see(assigned_merge_request) should_not_see(assigned_merge_request)
should_not_see(other_merge_request) should_not_see(other_merge_request)
end end
...@@ -22,6 +23,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps ...@@ -22,6 +23,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
step 'I have authored merge requests' do step 'I have authored merge requests' do
authored_merge_request authored_merge_request
authored_merge_request_from_fork
end end
step 'I have assigned merge requests' do step 'I have assigned merge requests' do
...@@ -57,11 +59,26 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps ...@@ -57,11 +59,26 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end end
def authored_merge_request 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 end
def other_merge_request 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 end
def project def project
...@@ -71,4 +88,12 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps ...@@ -71,4 +88,12 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
project project
end end
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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment