mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 02:05:12 +00:00
AdminApiControllerTest: Add test that deleted
users get deactivated.
This commit is contained in:
parent
86c18e4165
commit
05ff666f99
|
@ -158,6 +158,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
user = insert(:user)
|
||||
clear_config([:instance, :federating], true)
|
||||
|
||||
refute user.deactivated
|
||||
|
||||
with_mock Pleroma.Web.Federator,
|
||||
publish: fn _ -> nil end do
|
||||
conn =
|
||||
|
@ -176,6 +178,9 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
|
||||
assert json_response(conn, 200) == [user.nickname]
|
||||
|
||||
user = Repo.get(User, user.id)
|
||||
assert user.deactivated
|
||||
|
||||
assert called(Pleroma.Web.Federator.publish(:_))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue