summaryrefslogtreecommitdiff
path: root/spec/helpers/gitlab_markdown_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/gitlab_markdown_helper_spec.rb')
-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('<h1>test</h1>')
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