diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-10-09 16:12:17 +0200 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-10-09 16:12:17 +0200 |
commit | a912308340ec70f13de98ae5116a8d71929a995f (patch) | |
tree | 1c95b4aa7f917f919bef22013601645fa1a23a04 | |
parent | 64e72af3cb65731c84e1aa27b68a04fe378bebd9 (diff) | |
download | gitlab-ce-a912308340ec70f13de98ae5116a8d71929a995f.tar.gz |
Add a test for apostrophe in code blocks.
-rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 55270a9c204..0784834924c 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -539,6 +539,14 @@ describe GitlabMarkdownHelper do markdown(actual).should match(expected) end + it "should not link the apostrophe to issue 39 in code blocks" do + project.team << [user, :master] + project.issues.stub(:where).with(iid: '39').and_return([issue]) + + actual = "Yes, `it is @#{member.user.username}'s task.`" + expected = /Yes, <code>it is @gfm\'s task.<\/code>/ + markdown(actual).should match(expected) + end it "should handle references in <em>" do actual = "Apply _!#{merge_request.iid}_ ASAP" |