fixes #3704
This commit is contained in:
@@ -21,7 +21,7 @@ module Moderator
|
||||
|
||||
def undelete
|
||||
@post = ::Post.find(params[:id])
|
||||
@post.undelete!
|
||||
@post.approve!
|
||||
end
|
||||
|
||||
def confirm_move_favorites
|
||||
|
||||
@@ -42,7 +42,9 @@ module Moderator
|
||||
as_user do
|
||||
@post.update(is_deleted: true)
|
||||
end
|
||||
post_auth undelete_moderator_post_post_path(@post), @admin, params: {:format => "js"}
|
||||
assert_difference(-> { PostApproval.count }, 1) do
|
||||
post_auth undelete_moderator_post_post_path(@post), @admin, params: {:format => "js"}
|
||||
end
|
||||
|
||||
assert_response :success
|
||||
assert(!@post.reload.is_deleted?)
|
||||
|
||||
Reference in New Issue
Block a user