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/snippet_reference_filter_spec.rb | |
parent | 101779e4e9fd83ef1890a7499ef9b2723fb75cbf (diff) |
CE port of code changed for epics
Diffstat (limited to 'spec/lib/banzai/filter/snippet_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/snippet_reference_filter_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/snippet_reference_filter_spec.rb b/spec/lib/banzai/filter/snippet_reference_filter_spec.rb index 90ac4c7b238..3a07a6dc179 100644 --- a/spec/lib/banzai/filter/snippet_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/snippet_reference_filter_spec.rb @@ -201,4 +201,14 @@ describe Banzai::Filter::SnippetReferenceFilter do expect(reference_filter(act).to_html).to match(/<a.+>#{Regexp.escape(invalidate_reference(reference))}<\/a>/) end end + + context 'group context' do + it 'links to a valid reference' do + reference = "#{project.full_path}$#{snippet.id}" + + result = reference_filter("See #{reference}", { project: nil, group: create(:group) } ) + + expect(result.css('a').first.attr('href')).to eq(urls.project_snippet_url(project, snippet)) + end + end end |