Add default_scope to /api/v1/update_credentials

This commit is contained in:
rinpatch 2019-04-27 23:55:54 +03:00
commit ce3789e39a
3 changed files with 14 additions and 0 deletions

View file

@ -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)