diff options
Diffstat (limited to 'spec/features/explore/user_explores_projects_spec.rb')
-rw-r--r-- | spec/features/explore/user_explores_projects_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |