summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorJason Hollingsworth <jhworth.developer@gmail.com>2013-12-03 20:13:19 -0600
committerJason Hollingsworth <jhworth.developer@gmail.com>2013-12-17 12:48:59 -0600
commit1521f467cbf8b1b9b3e9cb4169f3e96a9984bb46 (patch)
treec3dbbcec4b1b517df01e678a1850d5c9ff3f3bda /features
parent26c8b3163454ab4610a8130f13de1dc686dcdabf (diff)
downloadgitlab-ce-1521f467cbf8b1b9b3e9cb4169f3e96a9984bb46.tar.gz
Update default public pull url.
This updates the default pull URL for public projects when the user is not logged in.
Diffstat (limited to 'features')
-rw-r--r--features/public/public_projects.feature19
-rw-r--r--features/steps/public/projects_feature.rb18
2 files changed, 32 insertions, 5 deletions
diff --git a/features/public/public_projects.feature b/features/public/public_projects.feature
index 5a30c03dd4a..d6574ca900e 100644
--- a/features/public/public_projects.feature
+++ b/features/public/public_projects.feature
@@ -26,6 +26,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
+ And I should see empty public project details with http clone info
+
+ Scenario: I visit an empty public project page as user
+ Given I sign in as a user
+ And public empty project "Empty Public Project"
+ When I visit empty project page
+ Then I should see empty public project details
+ And I should see empty public project details with ssh clone info
Scenario: I visit public area as user
Given I sign in as a user
@@ -42,10 +50,15 @@ Feature: Public Projects Feature
Scenario: I visit public project page
When I visit project "Community" page
Then I should see project "Community" home page
- And I should see a http link to the repository
+ And I should see an http link to the repository
- Scenario: I visit public area as user
+ Scenario: I visit public project page as user
Given I sign in as a user
When I visit project "Community" page
Then I should see project "Community" home page
- And I should see a ssh link to the repository
+ And I should see an ssh link to the repository
+
+ Scenario: I visit an empty public project page
+ Given public empty project "Empty Public Project"
+ When I visit empty project page
+ Then I should see empty public project details
diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects_feature.rb
index a4209bb9c78..47e52f47d07 100644
--- a/features/steps/public/projects_feature.rb
+++ b/features/steps/public/projects_feature.rb
@@ -46,6 +46,20 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
page.should have_content 'Git global setup'
end
+ step 'I should see empty public project details with http clone info' do
+ project = Project.find_by_name('Empty Public Project')
+ page.all(:css, '.git-empty .clone').each do |element|
+ element.text.should include(project.http_url_to_repo)
+ end
+ end
+
+ step 'I should see empty public project details with ssh clone info' do
+ project = Project.find_by_name('Empty Public Project')
+ page.all(:css, '.git-empty .clone').each do |element|
+ element.text.should include(project.url_to_repo)
+ end
+ end
+
step 'private project "Enterprise"' do
create :project, name: 'Enterprise'
end
@@ -84,12 +98,12 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
end
end
- Then 'I should see a http link to the repository' do
+ step 'I should see an http link to the repository' do
project = Project.find_by_name 'Community'
page.should have_field('project_clone', with: project.http_url_to_repo)
end
- Then 'I should see a ssh link to the repository' do
+ step 'I should see an ssh link to the repository' do
project = Project.find_by_name 'Community'
page.should have_field('project_clone', with: project.url_to_repo)
end