Skip to content
Snippets Groups Projects
Commit de0a7378 authored by David Wagner's avatar David Wagner
Browse files

Check that both '/help' and '/help/' URLs have the same behaviour


The links in the help page may be modified. This new test checks that
URLs in this page are absolute and do not depend on the presence of a
trailing slash in the URL.

Signed-off-by: default avatarDavid Wagner <david@marvid.fr>
parent c4ded595
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment