mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Should be able to recover a user deleted post if raw didn't change
This commit is contained in:
@@ -189,6 +189,16 @@ describe PostDestroyer do
|
||||
end
|
||||
|
||||
context "recovered by user" do
|
||||
|
||||
it "doesn't raise an error when the raw doesn't change" do
|
||||
PostRevisor.new(@reply).revise!(
|
||||
@user,
|
||||
{ edit_reason: 'made a change' },
|
||||
force_new_version: true
|
||||
)
|
||||
PostDestroyer.new(@user, @reply.reload).recover
|
||||
end
|
||||
|
||||
it "should increment the user's post count" do
|
||||
PostDestroyer.new(@user, @reply).destroy
|
||||
expect(@user.user_stat.topic_count).to eq(1)
|
||||
|
||||
Reference in New Issue
Block a user