mirror of
https://github.com/discourse/discourse.git
synced 2025-09-11 21:04:42 +08:00
Add backend code for searching posts with images.
This commit is contained in:
parent
8f7d81fde6
commit
76712da166
2 changed files with 7 additions and 2 deletions
|
@ -632,8 +632,9 @@ describe Search do
|
|||
post_uploaded = Fabricate(:post_with_uploaded_image)
|
||||
post_with_image_urls = Fabricate(:post_with_image_urls)
|
||||
Fabricate(:post)
|
||||
TopicLink.extract_from(post_uploaded)
|
||||
TopicLink.extract_from(post_with_image_urls)
|
||||
|
||||
CookedPostProcessor.new(post_uploaded).update_post_image
|
||||
CookedPostProcessor.new(post_with_image_urls).update_post_image
|
||||
|
||||
expect(Search.execute('in:image').posts.map(&:id).sort).to eq([post_uploaded.id, post_with_image_urls.id].sort)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue