diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-19 09:42:41 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-19 09:42:41 +0300 |
commit | 41f8f172609910efc9543632fecbd544d131535b (patch) | |
tree | 289e22bf14294e688f48cf6ee42690eb98a3a6cd /test | |
parent | a66da971ff2dcd5f1fe82d3826998a282f1448f3 (diff) | |
download | pleroma-41f8f172609910efc9543632fecbd544d131535b.tar.gz |
fix api/v1/accounts/update_credentials
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs | 7 |
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 fdb6d4c5d..696228203 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 @@ -112,6 +112,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do assert user_data["source"]["privacy"] == "unlisted" end + test "updates the user's privacy", %{conn: conn} do + conn = patch(conn, "/api/v1/accounts/update_credentials", %{source: %{privacy: "unlisted"}}) + + assert user_data = json_response_and_validate_schema(conn, 200) + assert user_data["source"]["privacy"] == "unlisted" + end + test "updates the user's hide_followers status", %{conn: conn} do conn = patch(conn, "/api/v1/accounts/update_credentials", %{hide_followers: "true"}) |