diff options
author | kaniini <nenolod@gmail.com> | 2019-05-14 12:06:08 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-05-14 12:06:08 +0000 |
commit | 4e69d1239afdf97fe84a1772faa242b8e362b369 (patch) | |
tree | b37250ceeea947d284cbff32fa5665a3bbdd15f9 /test/web/twitter_api/util_controller_test.exs | |
parent | cdcdbd88da76f18c21da7f6f15a29883044902c8 (diff) | |
parent | c1665fd94de456768ddd59b8873d1bd26878970d (diff) | |
download | pleroma-4e69d1239afdf97fe84a1772faa242b8e362b369.tar.gz pleroma-4e69d1239afdf97fe84a1772faa242b8e362b369.zip |
Merge branch 'feature/disable-account' into 'develop'
[#694] allow users to disable their own account
See merge request pleroma/pleroma!895
Diffstat (limited to 'test/web/twitter_api/util_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/util_controller_test.exs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs index 56474447b..14a8225f0 100644 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@ -251,4 +251,22 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do assert conn.status in [200, 503] end + + describe "POST /api/pleroma/disable_account" do + test "it returns HTTP 200", %{conn: conn} do + user = insert(:user) + + response = + conn + |> assign(:user, user) + |> post("/api/pleroma/disable_account", %{"password" => "test"}) + |> json_response(:ok) + + assert response == %{"status" => "success"} + + user = User.get_cached_by_id(user.id) + + assert user.info.deactivated == true + end + end end |