diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-04-08 17:12:57 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-04-08 17:12:57 +0200 |
commit | e617cf95d448891d51361154d6845218cb5a4508 (patch) | |
tree | ca28d9842a2181a96dbca88565fe29fed97e2937 /features | |
parent | fead96788c30c13b5adc25132cd003638a6d4f51 (diff) | |
download | gitlab-ce-e617cf95d448891d51361154d6845218cb5a4508.tar.gz |
Add issue to an empty repo, test.
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/issues.feature | 9 | ||||
-rw-r--r-- | features/steps/project/issues.rb | 21 |
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 |