summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-06-21 15:28:59 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-06-21 15:28:59 +0000
commit15a87f3129635354f5c1978e76ce0b3f6a91c34a (patch)
treed071231eb3b83c6f2365cbd0b1123ba8d6233ff1 /spec/lib
parent3a74ab29188bb692566a769363a37b781abf2867 (diff)
parentca696175dbbf664f25a87a300b99f2b97fa5db70 (diff)
downloadgitlab-ce-15a87f3129635354f5c1978e76ce0b3f6a91c34a.tar.gz
Merge branch '18590-banzai-filter-relativelinkfilter-is-slow' into 'master'
Optimize Banzai::Filter::RelativeLinkFilter See merge request !4813
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb
index 0e6685f0ffb..b9e4a4eaf0e 100644
--- a/spec/lib/banzai/filter/relative_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb
@@ -132,11 +132,8 @@ describe Banzai::Filter::RelativeLinkFilter, lib: true do
path = 'files/images/한글.png'
escaped = Addressable::URI.escape(path)
- # Stub these methods so the file doesn't actually need to be in the repo
- allow_any_instance_of(described_class).
- to receive(:file_exists?).and_return(true)
- allow_any_instance_of(described_class).
- to receive(:image?).with(path).and_return(true)
+ # Stub this method so the file doesn't actually need to be in the repo
+ allow_any_instance_of(described_class).to receive(:uri_type).and_return(:raw)
doc = filter(image(escaped))
expect(doc.at_css('img')['src']).to match '/raw/'