Commit 72d25a26bd6383a530f9da6bd01f994a5825237b

Authored by Marin Jankovski
1 parent 468c9ce4

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

features/public/public_projects.feature
... ... @@ -62,3 +62,14 @@ Feature: Public Projects Feature
62 62 Given public empty project "Empty Public Project"
63 63 When I visit empty project page
64 64 Then I should see empty public project details
  65 +
  66 + Scenario: I visit public project issues page as a non authorized user
  67 + Given I visit project "Community" page
  68 + And I visit "Community" issues page
  69 + Then I should see list of issues for "Community" project
  70 +@bug
  71 + Scenario: I visit public project issues page as authorized user
  72 + Given I sign in as a user
  73 + Given I visit project "Community" page
  74 + And I visit "Community" issues page
  75 + Then I should see list of issues for "Community" project
... ...
features/steps/public/projects_feature.rb
... ... @@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
107 107 project = Project.find_by(name: 'Community')
108 108 page.should have_field('project_clone', with: project.url_to_repo)
109 109 end
  110 +
  111 + step 'I visit "Community" issues page' do
  112 + project = Project.find_by(name: 'Community')
  113 + create(:issue,
  114 + title: "Bug",
  115 + project: project
  116 + )
  117 + create(:issue,
  118 + title: "New feature",
  119 + project: project
  120 + )
  121 + visit project_issues_path(project)
  122 + end
  123 +
  124 +
  125 + step 'I should see list of issues for "Community" project' do
  126 + project = Project.find_by(name: 'Community')
  127 +
  128 + page.should have_content "Bug"
  129 + page.should have_content project.name
  130 + page.should have_content "New feature"
  131 + end
110 132 end
111 133  
... ...