FIX: Do not suppress reply-to when other posts quoted

This commit is contained in:
Sam
2014-07-31 11:38:03 +10:00
parent 9950c5bcd6
commit e9a1af0113
7 changed files with 34 additions and 11 deletions

View File

@ -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

View File

@ -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