FIX: user-deleted posts with deferred flags can be destroyed

This commit is contained in:
Neil Lalonde
2018-08-09 14:54:23 -04:00
parent 04658bb2f1
commit d77dccc636
2 changed files with 10 additions and 3 deletions

View File

@@ -91,6 +91,12 @@ describe PostDestroyer do
reply1.reload
expect(reply1.deleted_at).to eq(nil)
# defer the flag, we should be able to delete the stub
PostAction.defer_flags!(reply1, Discourse.system_user)
PostDestroyer.destroy_stubs
reply1.reload
expect(reply1.deleted_at).to_not eq(nil)
end
it 'uses the delete_removed_posts_after site setting' do