diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-17 01:08:01 +0400 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-17 01:08:01 +0400 |
commit | 7635afd0c4872e2552413b17b1a63bae76e62e45 (patch) | |
tree | cc15f404edea6b225977c6fd751f1c391cec9c31 /spec | |
parent | 640d51f4b64041a37d302da46c90a4a735a4fe90 (diff) |
Use Urls for references in GFM
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/gitlab_markdown_helper_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb index 497a5f17846..7b51efdbba5 100644 --- a/spec/helpers/gitlab_markdown_helper_spec.rb +++ b/spec/helpers/gitlab_markdown_helper_spec.rb @@ -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'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 |