summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-11-12 18:36:50 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-11-12 18:45:28 +0700
commite6d7e27bd603806e96dfc2774f90cadb3cf73a8c (patch)
tree96b9c5de9bc8c43ee3bcd1e449bb19cec950a6e6 /test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
parent61fc739ab8917ccb5a12d6ab6db6130dc231990b (diff)
downloadpleroma-e6d7e27bd603806e96dfc2774f90cadb3cf73a8c.tar.gz
pleroma-e6d7e27bd603806e96dfc2774f90cadb3cf73a8c.zip
Add `allow_following_move` setting to User
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.exs15
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)