diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-08-18 00:24:28 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-08-18 00:24:28 -0500 |
commit | a0f5eb1a552cf161f0efb746d74c4c590de4f02f (patch) | |
tree | c378a03801cfeece10333010909670b8e25afcb6 | |
parent | dcc8926ff1bb7206295dcfe9ad9388cb3c05be2a (diff) | |
download | pleroma-a0f5eb1a552cf161f0efb746d74c4c590de4f02f.tar.gz |
Test that `POST /api/pleroma/delete_account` purges the user
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs index 109c1e637..354d77b56 100644 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@ -586,10 +586,16 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest 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 |