Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-04-08 19:12:57 +0400
committerMarin Jankovski <marin@gitlab.com>2014-04-08 19:12:57 +0400
commite617cf95d448891d51361154d6845218cb5a4508 (patch)
treeca28d9842a2181a96dbca88565fe29fed97e2937 /features
parentfead96788c30c13b5adc25132cd003638a6d4f51 (diff)
Add issue to an empty repo, test.
Diffstat (limited to 'features')
-rw-r--r--features/project/issues/issues.feature9
-rw-r--r--features/steps/project/issues.rb21
2 files changed, 30 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index 033051991e2..c5311544efa 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -67,3 +67,12 @@ Feature: Project Issues
Given I visit issue page "Release 0.4"
And I leave a comment with a header containing "Comment with a header"
Then The comment with the header should not have an ID
+
+ Scenario: Issues on empty project
+ Given empty project "Empty Project"
+ When I visit empty project page
+ And I see empty project details with ssh clone info
+ When I visit empty project's issues page
+ Given I click link "New Issue"
+ And I submit new issue "500 error on profile"
+ Then I should see issue "500 error on profile"
diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb
index a92fd50584d..d1f3ba25a21 100644
--- a/features/steps/project/issues.rb
+++ b/features/steps/project/issues.rb
@@ -142,4 +142,25 @@ class ProjectIssues < Spinach::FeatureSteps
project: project,
author: project.users.first)
end
+
+ Given 'empty project "Empty Project"' do
+ create :empty_project, name: 'Empty Project', namespace: @user.namespace
+ end
+
+ When 'I visit empty project page' do
+ project = Project.find_by(name: 'Empty Project')
+ visit project_path(project)
+ end
+
+ And 'I see empty project details with ssh clone info' do
+ project = Project.find_by(name: 'Empty Project')
+ page.all(:css, '.git-empty .clone').each do |element|
+ element.text.should include(project.url_to_repo)
+ end
+ end
+
+ When "I visit empty project's issues page" do
+ project = Project.find_by(name: 'Empty Project')
+ visit project_issues_path(project)
+ end
end