| ... | @@ -2,10 +2,6 @@ class Groups < Spinach::FeatureSteps |
... | @@ -2,10 +2,6 @@ class Groups < Spinach::FeatureSteps |
|
|
include SharedAuthentication
|
|
include SharedAuthentication
|
|
|
include SharedPaths
|
|
include SharedPaths
|
|
|
|
|
|
|
|
When 'I visit group page' do
|
|
|
|
|
visit group_path(current_group)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
Then 'I should see projects list' do
|
|
Then 'I should see projects list' do
|
|
|
current_user.projects.each do |project|
|
|
current_user.projects.each do |project|
|
|
|
page.should have_link project.name
|
|
page.should have_link project.name
|
| ... | @@ -24,9 +20,43 @@ class Groups < Spinach::FeatureSteps |
... | @@ -24,9 +20,43 @@ class Groups < Spinach::FeatureSteps |
|
|
page.should have_content 'closed issue'
|
|
page.should have_content 'closed issue'
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
Then 'I should see issues from this group assigned to me' do
|
|
|
|
assigned_to_me(:issues).each do |issue|
|
|
|
|
page.should have_content issue.title
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see merge requests from this group assigned to me' do
|
|
|
|
assigned_to_me(:merge_requests).each do |issue|
|
|
|
|
page.should have_content issue.title
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'project from group has issues assigned to me' do
|
|
|
|
create :issue,
|
|
|
|
project: project,
|
|
|
|
assignee: current_user,
|
|
|
|
author: current_user
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'project from group has merge requests assigned to me' do
|
|
|
|
create :merge_request,
|
|
|
|
project: project,
|
|
|
|
assignee: current_user,
|
|
|
|
author: current_user
|
|
|
|
end
|
|
|
|
|
|
|
protected
|
|
protected
|
|
|
|
|
|
|
|
def current_group
|
|
def current_group
|
|
|
@group ||= Group.first
|
|
@group ||= Group.first
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
def project
|
|
|
|
current_group.projects.first
|
|
|
|
end
|
|
|
|
|
|
|
|
def assigned_to_me key
|
|
|
|
project.send(key).where(assignee_id: current_user.id)
|
|
|
|
end
|
|
|
end |
|
end |