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:
authorIzaak Alpert <ialpert@blackberry.com>2013-09-20 19:39:12 +0400
committerIzaak Alpert <ialpert@blackberry.com>2013-09-20 19:42:38 +0400
commit61a86101e81368b79bc9b99ef355518cde83facc (patch)
treec55aef9b78009e97f8bf3e108fb922cda9cdbf22 /features
parent05ef996e52eddececee3e0edb9c8bb5a0dc4c82d (diff)
Prevent empty public projects from throwing exceptions
GITLAB-1279 (GITLAB-1264) Change-Id: Ifb5b4313bc91fae720f8ef5c36152c45e9d38934
Diffstat (limited to 'features')
-rw-r--r--features/public/public_projects.feature5
-rw-r--r--features/steps/public/projects_feature.rb18
2 files changed, 23 insertions, 0 deletions
diff --git a/features/public/public_projects.feature b/features/public/public_projects.feature
index c4f1b6203e7..1866d3f47fe 100644
--- a/features/public/public_projects.feature
+++ b/features/public/public_projects.feature
@@ -12,3 +12,8 @@ Feature: Public Projects Feature
When I visit public page for "Community" project
Then I should see public project details
And I should see project readme
+
+ Scenario: I visit an empty public project page
+ Given public empty project "Empty Public Project"
+ When I visit empty public project page
+ Then I should see empty public project details \ No newline at end of file
diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects_feature.rb
index 8d612498fb9..2268e9b9c5e 100644
--- a/features/steps/public/projects_feature.rb
+++ b/features/steps/public/projects_feature.rb
@@ -9,6 +9,11 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
page.should_not have_content "Enterprise"
end
+ step 'I should see project "Empty Public Project"' do
+ page.should have_content "Empty Public Project"
+ puts page.save_page('foo.html')
+ end
+
step 'I should see public project details' do
page.should have_content '32 branches'
page.should have_content '16 tags'
@@ -22,6 +27,19 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
create :project_with_code, name: 'Community', public: true
end
+ step 'public empty project "Empty Public Project"' do
+ create :project, name: 'Empty Public Project', public: true
+ end
+
+ step 'I visit empty public project page' do
+ project = Project.find_by_name('Empty Public Project')
+ visit public_project_path(project)
+ end
+
+ step 'I should see empty public project details' do
+ page.should have_content 'Empty Repository'
+ end
+
step 'private project "Enterprise"' do
create :project, name: 'Enterprise'
end