diff options
author | Jared Deckard <jared.deckard@gmail.com> | 2016-08-13 14:01:28 -0500 |
---|---|---|
committer | Jared Deckard <jared.deckard@gmail.com> | 2016-08-13 18:31:33 -0500 |
commit | b8cab61ff016156e8c527322bb72d4185d752e44 (patch) | |
tree | a275e32142a7a2468f13d9a781cbe1c061070624 | |
parent | 2c0f375f13cafa305237c306f423b1dd9ea70a23 (diff) | |
download | gitlab-ce-b8cab61ff016156e8c527322bb72d4185d752e44.tar.gz |
Fix false positive caused by non-interpolated string use
-rw-r--r-- | spec/lib/banzai/filter/image_link_filter_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/banzai/filter/image_link_filter_spec.rb b/spec/lib/banzai/filter/image_link_filter_spec.rb index d2d519113df..294558b3db2 100644 --- a/spec/lib/banzai/filter/image_link_filter_spec.rb +++ b/spec/lib/banzai/filter/image_link_filter_spec.rb @@ -13,8 +13,8 @@ describe Banzai::Filter::ImageLinkFilter, lib: true do end it 'does not wrap a duplicate link' do - exp = act = %q(<a href="/whatever">#{image('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg')}</a>) - expect(filter(act).to_html).to eq exp + doc = filter(%Q(<a href="/whatever">#{image('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg')}</a>)) + expect(doc.to_html).to match /^<a href="\/whatever"><img[^>]*><\/a>$/ end it 'works with external images' do |