mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 03:32:17 +08:00
FIX: Show quote replies when filtering (#11483)
Only applies when using the `enable_filtered_replies_view` site setting. The filter query was not accounting for quote replies.
This commit is contained in:
@ -2127,6 +2127,8 @@ RSpec.describe TopicsController do
|
||||
let!(:post3) { Fabricate(:post, topic: topic, reply_to_post_number: post2.post_number) }
|
||||
let!(:post4) { Fabricate(:post, topic: topic, reply_to_post_number: post2.post_number) }
|
||||
let!(:post5) { Fabricate(:post, topic: topic) }
|
||||
let!(:quote_reply) { Fabricate(:basic_reply, user: user, topic: topic) }
|
||||
let!(:post_reply) { PostReply.create(post_id: post2.id, reply_post_id: quote_reply.id) }
|
||||
|
||||
it 'should return the right posts' do
|
||||
get "/t/#{topic.id}.json", params: {
|
||||
@ -2141,7 +2143,7 @@ RSpec.describe TopicsController do
|
||||
expect(body.has_key?("related_messages")).to eq(false)
|
||||
|
||||
ids = body["post_stream"]["posts"].map { |p| p["id"] }
|
||||
expect(ids).to eq([post.id, post2.id, post3.id, post4.id])
|
||||
expect(ids).to eq([post.id, post2.id, post3.id, post4.id, quote_reply.id])
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user