Fix deleting banned users' statuses
This commit is contained in:
parent
5433742faf
commit
1fa196d8f7
4 changed files with 37 additions and 1 deletions
|
|
@ -393,6 +393,20 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
|
||||
refute Activity.get_by_id(post.id)
|
||||
end
|
||||
|
||||
test "it allows privileged users to delete banned user's posts" do
|
||||
clear_config([:instance, :moderator_privileges], [:messages_delete])
|
||||
user = insert(:user)
|
||||
moderator = insert(:user, is_moderator: true)
|
||||
|
||||
{:ok, post} = CommonAPI.post(user, %{status: "namu amida butsu"})
|
||||
User.set_activation(user, false)
|
||||
|
||||
assert {:ok, delete} = CommonAPI.delete(post.id, moderator)
|
||||
assert delete.local
|
||||
|
||||
refute Activity.get_by_id(post.id)
|
||||
end
|
||||
end
|
||||
|
||||
test "favoriting race condition" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue