A platform for community discussion. Free, open, simple.
DEV: Correct spec added in cfd507822f9330967f3ed9f970505e7f4896b523.
Guo Xiang Tan16215f9d3b02
diff --git a/spec/services/search_indexer_spec.rb b/spec/services/search_indexer_spec.rbindex 303458610b1..5aa9f21da68 100644--- a/spec/services/search_indexer_spec.rb+++ b/spec/services/search_indexer_spec.rb@@ -127,21 +127,27 @@ describe SearchIndexer doit 'should not include lightbox in search' doJobs.run_immediately!- SiteSetting.max_image_height = 2000SiteSetting.crawl_images = true- FastImage.expects(:size).returns([1750, 2000])+ SiteSetting.max_image_width = 1++ stub_request(:get, "https://meta.discourse.org/some.png")+ .to_return(status: 200, body: file_from_fixtures("logo.png").read)src = "https://meta.discourse.org/some.png"post = Fabricate(:post, raw: <<~RAW)Let me see how I can fix this image- <img src="#{src}" width="275" height="299">+ <img src="#{src}" width="2" height="2">RAWpost.rebake!post.reloadtopic = post.topic+ expect(post.cooked).to include(+ CookedPostProcessor::LIGHTBOX_WRAPPER_CSS_CLASS+ )+expect(post.post_search_data.raw_data).to eq("#{topic.title} #{topic.category.name} Let me see how I can fix this image")