Fix deactivated user deletion
This commit is contained in:
parent
29807ef6a5
commit
dfae61c25c
7 changed files with 36 additions and 26 deletions
|
|
@ -998,6 +998,14 @@ defmodule Pleroma.UserTest do
|
|||
refute Activity.get_by_id(activity.id)
|
||||
end
|
||||
|
||||
test "it deletes deactivated user" do
|
||||
admin = insert(:user, %{info: %{is_admin: true}})
|
||||
{:ok, user} = insert(:user, info: %{deactivated: true}) |> User.set_cache()
|
||||
|
||||
assert {:ok, _} = User.delete(user, admin.ap_id)
|
||||
refute User.get_by_id(user.id)
|
||||
end
|
||||
|
||||
test "it deletes a user, all follow relationships and all activities", %{user: user} do
|
||||
follower = insert(:user)
|
||||
{:ok, follower} = User.follow(follower, user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue