Add raw post content in "flagged post removed by staff" PM

This commit is contained in:
Vinoth Kannan
2019-01-21 12:27:23 +05:30
parent 2d354ec9b0
commit 9cf4013073
3 changed files with 13 additions and 3 deletions

View File

@ -650,7 +650,12 @@ describe PostDestroyer do
expect(second_post.bookmark_count).to eq(0)
expect(second_post.off_topic_count).to eq(1)
expect(Jobs::SendSystemMessage.jobs.size).to eq(1)
jobs = Jobs::SendSystemMessage.jobs
expect(jobs.size).to eq(1)
Jobs::SendSystemMessage.new.execute(jobs[0]["args"][0].with_indifferent_access)
expect(Post.last.raw).to include("[details=\"Click to expand removed post\"]\n```markdown\n#{second_post.raw}\n```\n[/details]")
end
it "should not send the flags_agreed_and_post_deleted message if it was deleted by system" do