diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 15:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 15:09:17 +0000 |
commit | 0d83264a7a24b33de933437355c77a4fe47e5419 (patch) | |
tree | ebf7a1d3274d918fb968d7056300cc388f2e91a4 /spec/controllers/help_controller_spec.rb | |
parent | b7c735c8ac11b8182807070fc6f84f2606e15427 (diff) | |
download | gitlab-ce-0d83264a7a24b33de933437355c77a4fe47e5419.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/help_controller_spec.rb')
-rw-r--r-- | spec/controllers/help_controller_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb index e010cac2f73..f03fee8d3ae 100644 --- a/spec/controllers/help_controller_spec.rb +++ b/spec/controllers/help_controller_spec.rb @@ -79,6 +79,20 @@ describe HelpController do expect(assigns[:help_index]).to eq '[protocol-relative](//example.com)' end end + + context 'restricted visibility set to public' do + before do + sign_out(user) + + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) + end + + it 'redirects to sign_in path' do + get :index + + expect(response).to redirect_to(new_user_session_path) + end + end end describe 'GET #show' do |