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:
authorRobert Speicher <rspeicher@gmail.com>2015-05-29 08:56:30 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-05-29 11:46:14 +0300
commit5733bdb7c7ccd59f63a3500882d22ebdcf822fe1 (patch)
treeddb0916ccc6c8628c39e9567695c6126d99e24be /spec/helpers
parent51888f746c8afe43c5fed90c8013a03788821099 (diff)
Fix link_to_gfm with only a reference having the incorrect link
Closes #1721
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb
index d0b200a9ff8..bbb434638ce 100644
--- a/spec/helpers/gitlab_markdown_helper_spec.rb
+++ b/spec/helpers/gitlab_markdown_helper_spec.rb
@@ -94,6 +94,12 @@ describe GitlabMarkdownHelper do
expect(link_to_gfm(actual, commit_path)).
to match('&lt;h1&gt;test&lt;/h1&gt;')
end
+
+ it 'ignores reference links when they are the entire body' do
+ text = issues[0].to_reference
+ act = link_to_gfm(text, '/foo')
+ expect(act).to eq %Q(<a href="/foo">#{issues[0].to_reference}</a>)
+ end
end
describe '#render_wiki_content' do