Add allow_following_move setting to User

This commit is contained in:
Egor Kislitsyn 2019-11-12 18:36:50 +07:00
commit e6d7e27bd6
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
10 changed files with 59 additions and 30 deletions

View file

@ -103,6 +103,21 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
assert user["locked"] == true
end
test "updates the user's allow_following_move", %{conn: conn} do
user = insert(:user)
assert user.allow_following_move == true
conn =
conn
|> assign(:user, user)
|> patch("/api/v1/accounts/update_credentials", %{allow_following_move: "false"})
assert refresh_record(user).allow_following_move == false
assert user = json_response(conn, 200)
assert user["pleroma"]["allow_following_move"] == false
end
test "updates the user's default scope", %{conn: conn} do
user = insert(:user)