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:
authorRémy Coutable <remy@rymai.me>2016-12-01 14:07:52 +0300
committerRémy Coutable <remy@rymai.me>2016-12-01 18:40:48 +0300
commit633538151b99c658bcbb2173e91eb5deba4408f7 (patch)
treea1b160554e8fb94a40ef3176e86128b0cbdeef28 /spec/features/help_pages_spec.rb
parent507abdb7739c2c6df49cee77c966c4db0dcaf1bb (diff)
Fix URL rewritting in the Help section
Signed-off-by: Rémy Coutable <remy@rymai.me>
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