diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-05-19 06:56:44 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-05-19 06:56:44 +0000 |
commit | 7e3814390e3e2695c514953562314bf46c1e49b0 (patch) | |
tree | 5b56d90775e733960c336f370d0b7e70b963ac65 /test | |
parent | 86f50a809f3237b98b8631262fe653839834915a (diff) | |
parent | 41f8f172609910efc9543632fecbd544d131535b (diff) | |
download | pleroma-7e3814390e3e2695c514953562314bf46c1e49b0.tar.gz |
Merge branch 'issue/1667' into 'develop'
[#1667] fix api/v1/accounts/update_credentials
See merge request pleroma/pleroma!2556
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"}) |