summaryrefslogtreecommitdiff
path: root/spec/helpers/gitlab_markdown_helper_spec.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-12-21 17:41:33 +0100
committerJames Lopez <james@jameslopez.es>2017-01-03 13:01:46 +0100
commit112f47057275312daa876bee5bd74d5464410bc5 (patch)
tree257495d658a39b8e31c3407498ec248cb97976a6 /spec/helpers/gitlab_markdown_helper_spec.rb
parentde25604fbca2f7005754d821d571bbcb1cc510ac (diff)
downloadgitlab-ce-112f47057275312daa876bee5bd74d5464410bc5.tar.gz
Fix cross-project references copy to include the project referencefix/cross-project-ref-path
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
Diffstat (limited to 'spec/helpers/gitlab_markdown_helper_spec.rb')
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb
index 1d494edcd3b..810311e2b1a 100644
--- a/spec/helpers/gitlab_markdown_helper_spec.rb
+++ b/spec/helpers/gitlab_markdown_helper_spec.rb
@@ -170,4 +170,14 @@ describe GitlabMarkdownHelper do
expect(doc.content).to eq "@#{user.username}, can you look at this?..."
end
end
+
+ describe '#cross_project_reference' do
+ it 'shows the full MR reference' do
+ expect(helper.cross_project_reference(project, merge_request)).to include(project.path_with_namespace)
+ end
+
+ it 'shows the full issue reference' do
+ expect(helper.cross_project_reference(project, issue)).to include(project.path_with_namespace)
+ end
+ end
end