summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-02-01 17:47:54 +0100
committerMarin Jankovski <marin@gitlab.com>2014-02-01 17:47:54 +0100
commit72d25a26bd6383a530f9da6bd01f994a5825237b (patch)
tree8bad85af228073646ba8df5ad2646d94ce167f87 /features
parent468c9ce4648462dee9eaf9001d23b925386a4531 (diff)
downloadgitlab-ce-72d25a26bd6383a530f9da6bd01f994a5825237b.tar.gz
Feature visit issues page for public project as auth and non auth user.
Diffstat (limited to 'features')
-rw-r--r--features/public/public_projects.feature11
-rw-r--r--features/steps/public/projects_feature.rb22
2 files changed, 33 insertions, 0 deletions
diff --git a/features/public/public_projects.feature b/features/public/public_projects.feature
index d6574ca900e..7d6e8e0679f 100644
--- a/features/public/public_projects.feature
+++ b/features/public/public_projects.feature
@@ -62,3 +62,14 @@ Feature: Public Projects Feature
Given public empty project "Empty Public Project"
When I visit empty project page
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
diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects_feature.rb
index c3ec10b87d3..1b77bf26e0c 100644
--- a/features/steps/public/projects_feature.rb
+++ b/features/steps/public/projects_feature.rb
@@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
project = Project.find_by(name: 'Community')
page.should have_field('project_clone', with: project.url_to_repo)
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