summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-09-04 21:40:26 +0300
committerValery Sizov <vsv2711@gmail.com>2015-09-09 11:27:03 +0300
commitb7431ec042bc14052c407fd277177681e189c892 (patch)
tree2abe23e6861186d0c0d793b3a51ad99047b2602f /features
parent349054e0ab4b03c9e259ed342af6cbb4e22936cd (diff)
downloadgitlab-ce-b7431ec042bc14052c407fd277177681e189c892.tar.gz
Make all group public
Diffstat (limited to 'features')
-rw-r--r--features/explore/groups.feature14
-rw-r--r--features/groups.feature11
-rw-r--r--features/steps/groups.rb20
3 files changed, 31 insertions, 14 deletions
diff --git a/features/explore/groups.feature b/features/explore/groups.feature
index c11634bd74a..a42e59c98f2 100644
--- a/features/explore/groups.feature
+++ b/features/explore/groups.feature
@@ -3,20 +3,6 @@ Feature: Explore Groups
Background:
Given group "TestGroup" has private project "Enterprise"
- Scenario: I should not see group with private projects as visitor
- When I visit group "TestGroup" page
- Then I should be redirected to sign in page
-
- Scenario: I should not see group with private projects group as user
- When I sign in as a user
- And I visit group "TestGroup" page
- Then page status code should be 404
-
- Scenario: I should not see group with private and internal projects as visitor
- Given group "TestGroup" has internal project "Internal"
- When I visit group "TestGroup" page
- Then I should be redirected to sign in page
-
Scenario: I should see group with private and internal projects as user
Given group "TestGroup" has internal project "Internal"
When I sign in as a user
diff --git a/features/groups.feature b/features/groups.feature
index d5272fdddcf..db37fa3b375 100644
--- a/features/groups.feature
+++ b/features/groups.feature
@@ -159,3 +159,14 @@ Feature: Groups
When I visit group "Owned" projects page
Then I should see group "Owned" projects list
And I should see "archived" label
+
+ # Public group
+ @javascript
+ Scenario: Signed out user should see group
+ Given "Mary Jane" is owner of group "Owned"
+ And I am a signed out user
+ And Group "Owned" has a public project "Public-project"
+ When I visit group "Owned" page
+ Then I should see group "Owned"
+ Then I should see project "Public-project"
+
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 18a1c4d32ce..45201c85f26 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -17,6 +17,26 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
find(:css, 'button.btn-new').click
end
+ step 'I should see group "Owned"' do
+ expect(page).to have_content '@owned'
+ end
+
+ step 'I am a signed out user' do
+ logout
+ end
+
+ step 'Group "Owned" has a public project "Public-project"' do
+ group = Group.find_by(name: "Owned")
+
+ @project = create :empty_project, :public,
+ group: group,
+ name: "Public-project"
+ end
+
+ step 'I should see project "Public-project"' do
+ expect(page).to have_content 'Public-project'
+ end
+
step 'I select "Mike" as "Reporter"' do
user = User.find_by(name: "Mike")