diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-01 12:07:52 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-01 16:40:48 +0100 |
commit | 633538151b99c658bcbb2173e91eb5deba4408f7 (patch) | |
tree | a1b160554e8fb94a40ef3176e86128b0cbdeef28 /spec/features/help_pages_spec.rb | |
parent | 507abdb7739c2c6df49cee77c966c4db0dcaf1bb (diff) | |
download | gitlab-ce-633538151b99c658bcbb2173e91eb5deba4408f7.tar.gz |
Fix URL rewritting in the Help section25199-fix-broken-urls-in-help-page
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.rb | 13 |
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 |