summaryrefslogtreecommitdiff
path: root/spec/controllers/help_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/help_controller_spec.rb')
-rw-r--r--spec/controllers/help_controller_spec.rb14
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