When deleting a post as staff, ask if you want to delete direct replies too

This commit is contained in:
Robin Ward
2013-09-04 20:50:58 -04:00
parent f157ec1f91
commit 71c1b8b9b9
5 changed files with 53 additions and 13 deletions

View File

@ -180,12 +180,12 @@ describe PostsController do
end
it "deletes the post" do
Post.any_instance.expects(:destroy).twice
PostDestroyer.any_instance.expects(:destroy).twice
xhr :delete, :destroy_many, post_ids: [post1.id, post2.id]
end
it "updates the highest read data for the forum" do
Topic.expects(:reset_highest)
Topic.expects(:reset_highest).twice
xhr :delete, :destroy_many, post_ids: [post1.id, post2.id]
end
@ -196,7 +196,7 @@ describe PostsController do
end
it "deletes the post and the reply to it" do
Post.any_instance.expects(:destroy).twice
PostDestroyer.any_instance.expects(:destroy).twice
xhr :delete, :destroy_many, post_ids: [post1.id], reply_post_ids: [post1.id]
end