summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 15:42:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 15:42:17 +0000
commit44fdf983bd35328dd577d3d3650d14163ef3e2b6 (patch)
tree84ff300d056cfbabb5a0fe2a9cbaa80aaeab1cc5 /spec/features
parentbc9fa07b26184b5c94808f704db6ea1ac81bf4de (diff)
downloadgitlab-ce-44fdf983bd35328dd577d3d3650d14163ef3e2b6.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/explore/groups_spec.rb12
-rw-r--r--spec/features/explore/user_explores_projects_spec.rb11
2 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/explore/groups_spec.rb b/spec/features/explore/groups_spec.rb
index eff63d6a788..50ec44580d2 100644
--- a/spec/features/explore/groups_spec.rb
+++ b/spec/features/explore/groups_spec.rb
@@ -89,5 +89,17 @@ describe 'Explore Groups', :js do
end
it_behaves_like 'renders group in public groups area'
+
+ context 'when visibility is restricted to public' do
+ before do
+ stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC])
+ end
+
+ it 'redirects to the sign in page' do
+ visit explore_groups_path
+
+ expect(page).to have_current_path(new_user_session_path)
+ end
+ end
end
end
diff --git a/spec/features/explore/user_explores_projects_spec.rb b/spec/features/explore/user_explores_projects_spec.rb
index c64709c0b55..6adf51a1cf6 100644
--- a/spec/features/explore/user_explores_projects_spec.rb
+++ b/spec/features/explore/user_explores_projects_spec.rb
@@ -16,6 +16,17 @@ describe 'User explores projects' do
include_examples 'shows public projects'
end
+
+ context 'when visibility is restricted to public' do
+ before do
+ stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC])
+ visit(explore_projects_path)
+ end
+
+ it 'redirects to login page' do
+ expect(page).to have_current_path(new_user_session_path)
+ end
+ end
end
context 'when signed in' do