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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 18:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 18:09:17 +0300
commit0d83264a7a24b33de933437355c77a4fe47e5419 (patch)
treeebf7a1d3274d918fb968d7056300cc388f2e91a4 /spec/features
parentb7c735c8ac11b8182807070fc6f84f2606e15427 (diff)
Add latest changes from gitlab-org/gitlab@master
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