diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-11-01 20:35:14 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-11-02 09:14:35 +0300 |
commit | 064c8949bd2cbbd304909b84f4ddac3c80827b94 (patch) | |
tree | 2eda37a87768439b4485dd161b8aa0fe809ad923 /spec/lib/banzai/filter/merge_request_reference_filter_spec.rb | |
parent | 101779e4e9fd83ef1890a7499ef9b2723fb75cbf (diff) |
CE port of code changed for epics
Diffstat (limited to 'spec/lib/banzai/filter/merge_request_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/merge_request_reference_filter_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb b/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb index ed2788f8a33..158844e25ae 100644 --- a/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/merge_request_reference_filter_spec.rb @@ -214,4 +214,14 @@ describe Banzai::Filter::MergeRequestReferenceFilter do expect(doc.to_html).to match(/\(<a.+>#{Regexp.escape(merge.to_reference(project))} \(diffs, comment 123\)<\/a>\.\)/) end end + + context 'group context' do + it 'links to a valid reference' do + reference = "#{project.full_path}!#{merge.iid}" + + result = reference_filter("See #{reference}", { project: nil, group: create(:group) } ) + + expect(result.css('a').first.attr('href')).to eq(urls.project_merge_request_url(project, merge)) + end + end end |