diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-20 11:28:40 +0100 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-25 10:10:05 +0100 |
commit | 0c350b79395d6712c7c4fee649cdbd77aa4052cc (patch) | |
tree | 2899a67fbe65c29b84c35ab417dbec96913095c4 /spec/lib/banzai/filter/user_reference_filter_spec.rb | |
parent | bf708e55c2e6035b64861a1cda8bfe3d3b4a2105 (diff) | |
download | gitlab-ce-0c350b79395d6712c7c4fee649cdbd77aa4052cc.tar.gz |
address comments
Diffstat (limited to 'spec/lib/banzai/filter/user_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/user_reference_filter_spec.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/user_reference_filter_spec.rb b/spec/lib/banzai/filter/user_reference_filter_spec.rb index 2166350f579..3e1ac9fb2b2 100644 --- a/spec/lib/banzai/filter/user_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/user_reference_filter_spec.rb @@ -157,17 +157,20 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do it 'does not link a User' do doc = reference_filter("Hey #{reference}") + expect(doc).not_to include('a') end context 'when skip_project_check set to true' do it 'links to a User' do doc = reference_filter("Hey #{reference}", skip_project_check: true) + expect(doc.css('a').first.attr('href')).to eq urls.user_url(user) end it 'does not link users using @all reference' do doc = reference_filter("Hey #{User.reference_prefix}all", skip_project_check: true) + expect(doc).not_to include('a') end end |