diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-04 09:34:44 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-04 09:34:44 +0300 |
commit | 29a98b86b7056540ed4102a83dfe6a7e809c2519 (patch) | |
tree | 559c763669b1f647f96ff9fa67e36343da87565f /test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs | |
parent | 652cc6ba4b7a0494cc96ef4a9bfcaa3b5e5be60e (diff) | |
parent | 7722e5a67a46304f3ae0e37f674a44ca9268be5e (diff) | |
download | pleroma-29a98b86b7056540ed4102a83dfe6a7e809c2519.tar.gz pleroma-29a98b86b7056540ed4102a83dfe6a7e809c2519.zip |
Merge branch 'develop' into issue/1383
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs | 15 |
1 files changed, 15 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 519b56d6c..77cfce4fa 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 @@ -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) |