diff options
author | David Wagner <david@marvid.fr> | 2016-11-18 12:57:25 +0100 |
---|---|---|
committer | David Wagner <david@marvid.fr> | 2016-11-20 20:15:08 +0100 |
commit | c4ded595ccf520bc30bde90403366ad14ba8b594 (patch) | |
tree | 0771a2f1204edae9fc03c4ffdc5bf91517a41bde /spec/controllers/help_controller_spec.rb | |
parent | 9aded5c8d43cf113b03e2d8fd04a32c4b24af24d (diff) | |
download | gitlab-ce-c4ded595ccf520bc30bde90403366ad14ba8b594.tar.gz |
Fix broken external links in help/index.html
An external link was recently added but was broken because
'https://gitlab.com/help/' was prepended to every link in the page.
Since no link in the main help readme begins with "help" and since doing
so wouldn't make sense, the substitution conditionaly prepending "help"
can be simplified and reused.
Signed-off-by: David Wagner <david@marvid.fr>
Diffstat (limited to 'spec/controllers/help_controller_spec.rb')
-rw-r--r-- | spec/controllers/help_controller_spec.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb index 6fc6ea95e13..cffed987f6b 100644 --- a/spec/controllers/help_controller_spec.rb +++ b/spec/controllers/help_controller_spec.rb @@ -16,14 +16,6 @@ describe HelpController do end end - context 'when url prefixed with help/' do - it 'will be an absolute path' do - stub_readme("[API](help/api/README.md)") - get :index - expect(assigns[:help_index]).to eq '[API](/help/api/README.md)' - end - end - context 'when url prefixed with help' do it 'will be an absolute path' do stub_readme("[API](helpful_hints/README.md)") @@ -32,11 +24,11 @@ describe HelpController do end end - context 'when url prefixed with /help/' do + context 'when url is an external link' do it 'will not be changed' do - stub_readme("[API](/help/api/README.md)") + stub_readme("[external](https://some.external.link)") get :index - expect(assigns[:help_index]).to eq '[API](/help/api/README.md)' + expect(assigns[:help_index]).to eq '[external](https://some.external.link)' end end end |