Commit 72d25a26 authored by Marin Jankovski's avatar Marin Jankovski

Feature visit issues page for public project as auth and non auth user.

parent 468c9ce4
...@@ -62,3 +62,14 @@ Feature: Public Projects Feature ...@@ -62,3 +62,14 @@ Feature: Public Projects Feature
Given public empty project "Empty Public Project" Given public empty project "Empty Public Project"
When I visit empty project page When I visit empty project page
Then I should see empty public project details Then I should see empty public project details
Scenario: I visit public project issues page as a non authorized user
Given I visit project "Community" page
And I visit "Community" issues page
Then I should see list of issues for "Community" project
@bug
Scenario: I visit public project issues page as authorized user
Given I sign in as a user
Given I visit project "Community" page
And I visit "Community" issues page
Then I should see list of issues for "Community" project
...@@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps ...@@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
project = Project.find_by(name: 'Community') project = Project.find_by(name: 'Community')
page.should have_field('project_clone', with: project.url_to_repo) page.should have_field('project_clone', with: project.url_to_repo)
end end
step 'I visit "Community" issues page' do
project = Project.find_by(name: 'Community')
create(:issue,
title: "Bug",
project: project
)
create(:issue,
title: "New feature",
project: project
)
visit project_issues_path(project)
end
step 'I should see list of issues for "Community" project' do
project = Project.find_by(name: 'Community')
page.should have_content "Bug"
page.should have_content project.name
page.should have_content "New feature"
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