Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-17 01:08:01 +0400
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-17 01:08:01 +0400
commit7635afd0c4872e2552413b17b1a63bae76e62e45 (patch)
treecc15f404edea6b225977c6fd751f1c391cec9c31 /spec
parent640d51f4b64041a37d302da46c90a4a735a4fe90 (diff)
Use Urls for references in GFM
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb8
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&#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