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:
Diffstat (limited to 'spec/controllers/help_controller_spec.rb')
-rw-r--r--spec/controllers/help_controller_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
index ac6715bacd5..056df213209 100644
--- a/spec/controllers/help_controller_spec.rb
+++ b/spec/controllers/help_controller_spec.rb
@@ -181,6 +181,7 @@ RSpec.describe HelpController do
context 'when requested file exists' do
before do
stub_doc_file_read(file_name: 'user/ssh.md', content: fixture_file('blockquote_fence_after.md'))
+ stub_application_setting(help_page_documentation_base_url: '')
subject
end
@@ -223,13 +224,13 @@ RSpec.describe HelpController do
context 'when gitlab_docs is disabled' do
let(:docs_enabled) { false }
- it_behaves_like 'documentation pages local render'
+ it_behaves_like 'documentation pages redirect', 'https://docs.gitlab.com'
end
context 'when host is missing' do
let(:host) { nil }
- it_behaves_like 'documentation pages local render'
+ it_behaves_like 'documentation pages redirect', 'https://docs.gitlab.com'
end
end
@@ -251,6 +252,10 @@ RSpec.describe HelpController do
end
context 'when requested file is missing' do
+ before do
+ stub_application_setting(help_page_documentation_base_url: '')
+ end
+
it 'renders not found' do
get :show, params: { path: 'foo/bar' }, format: :md
expect(response).to be_not_found