fixes #3704
This commit is contained in:
@@ -21,7 +21,7 @@ module Moderator
|
|||||||
|
|
||||||
def undelete
|
def undelete
|
||||||
@post = ::Post.find(params[:id])
|
@post = ::Post.find(params[:id])
|
||||||
@post.undelete!
|
@post.approve!
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_move_favorites
|
def confirm_move_favorites
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ module Moderator
|
|||||||
as_user do
|
as_user do
|
||||||
@post.update(is_deleted: true)
|
@post.update(is_deleted: true)
|
||||||
end
|
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_response :success
|
||||||
assert(!@post.reload.is_deleted?)
|
assert(!@post.reload.is_deleted?)
|
||||||
|
|||||||
Reference in New Issue
Block a user