mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
more tests
This commit is contained in:
parent
dd097a406b
commit
d0304b4f92
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue