FIX: when composing a message do not suggest deleted posts users (#15488)

This commit is contained in:
Arpit Jalan
2022-01-07 17:06:11 +05:30
committed by GitHub
parent 748e08830f
commit 554ff07786
2 changed files with 7 additions and 1 deletions

View File

@@ -176,6 +176,12 @@ describe UserSearch do
expect(results).to eq [mr_blue.username]
end
it "does not include deleted posts users" do
post4.trash!
results = search_for("", topic_id: topic.id)
expect(results).to eq [mr_orange, mr_b].map(&:username)
end
it "only reveals topic participants to people with permission" do
pm_topic = Fabricate(:private_message_post).topic