Commit 593dfc40 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

FIx userteams tests

parent 48e5dff9
......@@ -131,9 +131,7 @@ class Userteams < Spinach::FeatureSteps
Given 'project from team has merge requests assigned to me' do
team = UserTeam.last
team.projects.each do |project|
team.members.each do |member|
3.times { create(:merge_request, assignee: member, project: project) }
end
create(:merge_request, assignee: current_user, project: project)
end
end
......@@ -145,10 +143,8 @@ class Userteams < Spinach::FeatureSteps
Then 'I should see merge requests from this team assigned to me' do
team = UserTeam.last
team.projects.each do |project|
team.members.each do |member|
project.issues.assigned(member).each do |merge_request|
page.should have_content merge_request.title
end
project.merge_requests.each do |merge_request|
page.should have_content merge_request.title
end
end
end
......@@ -156,20 +152,8 @@ class Userteams < Spinach::FeatureSteps
Given 'project from team has merge requests assigned to team members' do
team = UserTeam.last
team.projects.each do |project|
team.members.each do |member|
3.times { create(:merge_request, assignee: member, project: project) }
end
end
end
Then 'I should see merge requests from this team assigned to me' do
team = UserTeam.last
team.projects.each do |project|
team.members.each do |member|
project.issues.assigned(member).each do |merge_request|
page.should have_content merge_request.title
end
end
member = team.members.sample
create(:merge_request, assignee: member, project: project)
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