mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 10:41:25 +08:00
FIX: Do not suppress reply-to when other posts quoted
This commit is contained in:
@ -636,10 +636,6 @@ describe Post do
|
||||
reply.quote_count.should == 1
|
||||
end
|
||||
|
||||
it "isn't quoteless" do
|
||||
reply.should_not be_quoteless
|
||||
end
|
||||
|
||||
it 'has a reply to the user of the original user' do
|
||||
reply.reply_to_user.should == post.user
|
||||
end
|
||||
|
@ -4,9 +4,11 @@ describe QuotedPost do
|
||||
it 'correctly extracts quotes in integration test' do
|
||||
post1 = create_post
|
||||
post2 = create_post(topic_id: post1.topic_id,
|
||||
raw: "[quote=\"#{post1.user.username}, post: 1, topic:#{post1.topic_id}\"]\ntest\n[/quote]\nthis is a test post")
|
||||
raw: "[quote=\"#{post1.user.username}, post: 1, topic:#{post1.topic_id}\"]\ntest\n[/quote]\nthis is a test post",
|
||||
reply_to_post_number: 1)
|
||||
|
||||
QuotedPost.find_by(post_id: post2.id, quoted_post_id: post1.id).should_not be_nil
|
||||
post2.reply_quoted.should == true
|
||||
end
|
||||
|
||||
it 'correctly handles deltas' do
|
||||
@ -23,5 +25,6 @@ HTML
|
||||
QuotedPost.where(post_id: post2.id).count.should == 1
|
||||
QuotedPost.find_by(post_id: post2.id, quoted_post_id: post1.id).should_not be_nil
|
||||
|
||||
post2.reply_quoted.should == false
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user