Add a test for apostrophe in code blocks.

This commit is contained in:
Marin Jankovski 2014-10-09 16:12:17 +02:00
parent 64e72af3cb
commit a912308340

View file

@ -539,6 +539,14 @@ describe GitlabMarkdownHelper do
markdown(actual).should match(expected) markdown(actual).should match(expected)
end 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 it "should handle references in <em>" do
actual = "Apply _!#{merge_request.iid}_ ASAP" actual = "Apply _!#{merge_request.iid}_ ASAP"