Verified Commit a0f5eb1a authored by Alex Gleason's avatar Alex Gleason
Browse files

Test that `POST /api/pleroma/delete_account` purges the user

parent dcc8926f
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment