Commit d7476123 authored by Marin Jankovski's avatar Marin Jankovski

Failing feature for dashboard issues when user has authored issues on projects...

Failing feature for dashboard issues when user has authored issues on projects he is not a member of.
parent 6280b53f
...@@ -10,6 +10,7 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps ...@@ -10,6 +10,7 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
step 'I should see issues authored by me' do step 'I should see issues authored by me' do
should_see(authored_issue) should_see(authored_issue)
should_see(authored_issue_on_public_project)
should_not_see(assigned_issue) should_not_see(assigned_issue)
should_not_see(other_issue) should_not_see(other_issue)
end end
...@@ -22,6 +23,7 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps ...@@ -22,6 +23,7 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
step 'I have authored issues' do step 'I have authored issues' do
authored_issue authored_issue
authored_issue_on_public_project
end end
step 'I have assigned issues' do step 'I have assigned issues' do
...@@ -64,6 +66,10 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps ...@@ -64,6 +66,10 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
@other_issue ||= create :issue, project: project @other_issue ||= create :issue, project: project
end end
def authored_issue_on_public_project
@authored_issue_on_public_project ||= create :issue, author: current_user, project: public_project
end
def project def project
@project ||= begin @project ||= begin
project =create :project project =create :project
...@@ -71,4 +77,8 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps ...@@ -71,4 +77,8 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
project project
end end
end end
def public_project
@public_project ||= create :project, :public
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