From: Egor Kislitsyn Date: Thu, 25 Apr 2019 06:41:10 +0000 (+0700) Subject: Merge branch 'develop' into feature/disable-account X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=c157e27a000a12dc8f660c056744a6611beb01b1;p=akkoma Merge branch 'develop' into feature/disable-account --- c157e27a000a12dc8f660c056744a6611beb01b1 diff --cc test/web/twitter_api/util_controller_test.exs index 0288e24d1,56474447b..14a8225f0 --- a/test/web/twitter_api/util_controller_test.exs +++ b/test/web/twitter_api/util_controller_test.exs @@@ -246,21 -246,9 +246,27 @@@ defmodule Pleroma.Web.TwitterAPI.UtilCo end end + test "GET /api/pleroma/healthcheck", %{conn: conn} do + conn = get(conn, "/api/pleroma/healthcheck") + + 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