aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-04-12 16:51:28 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-04-12 16:51:28 +0700
commitd0304b4f925ac9b3b57f294ef091b96b071e97b9 (patch)
tree1b1d90c98c038d38ca369ce498643b7c741a810d
parentdd097a406baf15e983454ab8f13635b4af2a8de4 (diff)
downloadpleroma-d0304b4f925ac9b3b57f294ef091b96b071e97b9.tar.gz
more tests
-rw-r--r--test/web/twitter_api/util_controller_test.exs18
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 a4b3d651a..66d89eee0 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -230,4 +230,22 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
assert html_response(response, 200) =~ "Log in to follow"
end
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