summaryrefslogtreecommitdiff
path: root/spec/features/help_pages_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/help_pages_spec.rb')
-rw-r--r--spec/features/help_pages_spec.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb
index 73d03837144..4319d6db0d2 100644
--- a/spec/features/help_pages_spec.rb
+++ b/spec/features/help_pages_spec.rb
@@ -12,9 +12,9 @@ describe 'Help Pages', feature: true do
end
describe 'Get the main help page' do
- shared_examples_for 'help page' do
+ shared_examples_for 'help page' do |prefix: ''|
it 'prefixes links correctly' do
- expect(page).to have_selector('div.documentation-index > ul a[href="/help/api/README.md"]')
+ expect(page).to have_selector(%(div.documentation-index > ul a[href="#{prefix}/help/api/README.md"]))
end
end
@@ -33,5 +33,14 @@ describe 'Help Pages', feature: true do
it_behaves_like 'help page'
end
+
+ context 'with a relative installation' do
+ before do
+ stub_config_setting(relative_url_root: '/gitlab')
+ visit help_path
+ end
+
+ it_behaves_like 'help page', prefix: '/gitlab'
+ end
end
end