forked from YokaiRick/akkoma
Test that POST /api/pleroma/delete_account
purges the user
This commit is contained in:
parent
dcc8926ff1
commit
a0f5eb1a55
1 changed files with 8 additions and 2 deletions
|
@ -586,10 +586,16 @@ test "with proper permissions and wrong or missing password", %{conn: conn} do
|
|||
end
|
||||
end
|
||||
|
||||
test "with proper permissions and valid password", %{conn: conn} do
|
||||
test "with proper permissions and valid password", %{conn: conn, user: user} do
|
||||
conn = post(conn, "/api/pleroma/delete_account", %{"password" => "test"})
|
||||
|
||||
ObanHelpers.perform_all()
|
||||
assert json_response(conn, 200) == %{"status" => "success"}
|
||||
|
||||
user = User.get_by_id(user.id)
|
||||
assert user.deactivated == true
|
||||
assert user.name == nil
|
||||
assert user.bio == nil
|
||||
assert user.password_hash == nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue