Use Urls for references in GFM

This commit is contained in:
Riyad Preukschas 2013-01-16 22:08:01 +01:00
parent 640d51f4b6
commit 7635afd0c4
2 changed files with 11 additions and 7 deletions

View file

@ -272,7 +272,7 @@ describe GitlabMarkdownHelper do
groups[0].should match(/This should finally fix $/)
# First issue link
groups[1].should match(/href="#{project_issue_path(project, issues[0])}"/)
groups[1].should match(/href="#{project_issue_url(project, issues[0])}"/)
groups[1].should match(/##{issues[0].id}$/)
# Internal commit link
@ -280,7 +280,7 @@ describe GitlabMarkdownHelper do
groups[2].should match(/ and /)
# Second issue link
groups[3].should match(/href="#{project_issue_path(project, issues[1])}"/)
groups[3].should match(/href="#{project_issue_url(project, issues[1])}"/)
groups[3].should match(/##{issues[1].id}$/)
# Trailing commit link
@ -339,5 +339,9 @@ describe GitlabMarkdownHelper do
it "should leave inline code untouched" do
markdown("\nDon't use `$#{snippet.id}` here.\n").should == "<p>Don&#39;t use <code>$#{snippet.id}</code> here.</p>\n"
end
it "should generate absolute urls for refs" do
markdown("##{issue.id}").should include(project_issue_url(project, issue))
end
end
end