summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-03 15:54:25 +0200
committerlain <lain@soykaf.club>2020-07-03 15:54:25 +0200
commite3b5559780f798945eea59170afa9ef41bbf59b3 (patch)
treec4df2a4040e08d3c424e103b79426941427bae1d /test
parent4a7b89e37217af4d98746bb934b8264d7a8de51d (diff)
downloadpleroma-e3b5559780f798945eea59170afa9ef41bbf59b3.tar.gz
pleroma-e3b5559780f798945eea59170afa9ef41bbf59b3.zip
AccountController: Make setting accepts_chat_messages possible.
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
index f67d294ba..37e33bc33 100644
--- a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
+++ b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
@@ -108,6 +108,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
assert user_data["locked"] == true
end
+ test "updates the user's chat acceptance status", %{conn: conn} do
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{accepts_chat_messages: "false"})
+
+ assert user_data = json_response_and_validate_schema(conn, 200)
+ assert user_data["pleroma"]["accepts_chat_messages"] == false
+ end
+
test "updates the user's allow_following_move", %{user: user, conn: conn} do
assert user.allow_following_move == true