diff options
author | rinpatch <rinpatch@sdf.org> | 2019-04-27 23:55:54 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-04-27 23:55:54 +0300 |
commit | ce3789e39ab0b63e634d583cbafbda7a9e4d7550 (patch) | |
tree | 890246985a98199aa9ca9bbdc4b25210106619a5 /test | |
parent | 002ea343f8c6dc9669bce91942f835a2c7cc6ae7 (diff) | |
download | pleroma-ce3789e39ab0b63e634d583cbafbda7a9e4d7550.tar.gz |
Add default_scope to /api/v1/update_credentials
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index aea0afa25..c2a12d3c7 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -2214,6 +2214,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert user["locked"] == true end + test "updates the user's default scope", %{conn: conn} do + user = insert(:user) + + conn = + conn + |> assign(:user, user) + |> patch("/api/v1/accounts/update_credentials", %{default_scope: "cofe"}) + + assert user = json_response(conn, 200) + assert user["source"]["privacy"] == "cofe" + end + test "updates the user's hide_followers status", %{conn: conn} do user = insert(:user) |