1 class DashboardIssues < Spinach::FeatureSteps
2 include SharedAuthentication
5 step 'I should see issues assigned to me' do
6 should_see(assigned_issue)
7 should_not_see(authored_issue)
8 should_not_see(other_issue)
11 step 'I should see issues authored by me' do
12 should_see(authored_issue)
13 should_not_see(assigned_issue)
14 should_not_see(other_issue)
17 step 'I should see all issues' do
18 should_see(authored_issue)
19 should_see(assigned_issue)
20 should_see(other_issue)
23 step 'I have authored issues' do
27 step 'I have assigned issues' do
31 step 'I have other issues' do
35 step 'I click "Authored by me" link' do
36 within ".scope-filter" do
37 click_link 'Created by me'
41 step 'I click "All" link' do
42 within ".scope-filter" do
43 click_link "Everyone's"
48 page.should have_content(issue.title[0..10])
51 def should_not_see(issue)
52 page.should_not have_content(issue.title[0..10])
56 @assigned_issue ||= create :issue, assignee: current_user, project: project
60 @authored_issue ||= create :issue, author: current_user, project: project
64 @other_issue ||= create :issue, project: project
69 project =create :project_with_code
70 project.team << [current_user, :master]