mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: Do not show hidden posts in search results (#26800)
This commit is contained in:
@ -1026,6 +1026,13 @@ RSpec.describe Search do
|
||||
expect(results.posts).to eq([post])
|
||||
end
|
||||
|
||||
it "does not return hidden posts" do
|
||||
Fabricate(:post, raw: "Can you see me? I'm a hidden post", hidden: true)
|
||||
|
||||
results = Search.execute("hidden post")
|
||||
expect(results.posts.count).to eq(0)
|
||||
end
|
||||
|
||||
it "does not rely on postgres's proximity opreators" do
|
||||
topic.update!(title: "End-to-end something something testing")
|
||||
|
||||
|
Reference in New Issue
Block a user