summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-28 09:01:08 +0000
committerRémy Coutable <remy@rymai.me>2016-11-28 09:01:08 +0000
commitbcc030240cf888da6a9f75250c7647bc9f8cffd7 (patch)
treea26a3806cbc9e7dddcccf821613428da63f33488 /spec/features
parent7f8bb20f8fb69cd2b6a8b9c2deb6aaddf886e0f3 (diff)
parentde0a7378eb0e08ab532a6ba80550abf9fe9db875 (diff)
downloadgitlab-ce-bcc030240cf888da6a9f75250c7647bc9f8cffd7.tar.gz
Merge branch 'fix-dead-help-link' into 'master'
Fix a broken link and avoid potential creation of future broken links on the help page. See merge request !7582
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/help_pages_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb
index e2101b333e2..73d03837144 100644
--- a/spec/features/help_pages_spec.rb
+++ b/spec/features/help_pages_spec.rb
@@ -10,4 +10,28 @@ describe 'Help Pages', feature: true do
expect(page).to have_content("ssh-keygen -t rsa -C \"#{@user.email}\"")
end
end
+
+ describe 'Get the main help page' do
+ shared_examples_for 'help page' do
+ it 'prefixes links correctly' do
+ expect(page).to have_selector('div.documentation-index > ul a[href="/help/api/README.md"]')
+ end
+ end
+
+ context 'without a trailing slash' do
+ before do
+ visit help_path
+ end
+
+ it_behaves_like 'help page'
+ end
+
+ context 'with a trailing slash' do
+ before do
+ visit help_path + '/'
+ end
+
+ it_behaves_like 'help page'
+ end
+ end
end