From 89aeed183ccbadc9580945a68b8df83f50856c2c Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 26 Jan 2016 12:16:47 +0100 Subject: feature and fix for 500 on group missing --- features/explore/groups.feature | 5 +++++ features/steps/explore/groups.rb | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'features') diff --git a/features/explore/groups.feature b/features/explore/groups.feature index 5fc9b135601..7529dcc3d9d 100644 --- a/features/explore/groups.feature +++ b/features/explore/groups.feature @@ -3,6 +3,11 @@ Feature: Explore Groups Background: Given group "TestGroup" has private project "Enterprise" + Scenario: I should not see a group if it does not exist + When I sign in as a user + And I visit group "NonExistentGroup" page + Then page status code should be 404 + 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/steps/explore/groups.rb b/features/steps/explore/groups.rb index 87f32e70d59..68c473e7b29 100644 --- a/features/steps/explore/groups.rb +++ b/features/steps/explore/groups.rb @@ -26,6 +26,10 @@ class Spinach::Features::ExploreGroups < Spinach::FeatureSteps visit group_path(Group.find_by(name: "TestGroup")) end + step 'I visit group "NonExistentGroup" page' do + visit group_path(-1) + end + step 'I visit group "TestGroup" issues page' do visit issues_group_path(Group.find_by(name: "TestGroup")) end -- cgit v1.2.1