From 099cf3558f9e41022ac38d2f8226bdbe3c9aa470 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Thu, 9 Oct 2014 14:02:10 +0200 Subject: Failing test for apostrophe at the end of user mention on project with issue iid 39. --- spec/helpers/gitlab_markdown_helper_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 15033f07432..f7b87f2966e 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -530,6 +530,16 @@ describe GitlabMarkdownHelper do markdown(actual).should match(%r{
  • light by @#{member.user.username}
  • }) end + it "should not link the apostrophe to issue 39" 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, it is @#{member.user.username}<\/a>'s task/ + markdown(actual).should match(expected) + end + + it "should handle references in " do actual = "Apply _!#{merge_request.iid}_ ASAP" -- cgit v1.2.1