summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-12-05 12:18:59 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-12-05 12:18:59 +0300
commite21afdb7c76c9773aeb51e37ff3bc2874e7a74f7 (patch)
treefd8ca0c111cff6ef663b4272d64d64333a451032 /test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
parent88f7cf51d43181b27db5ff1807d3e706fa336bac (diff)
parent228bf4d214abe3bb62c52128d3bc145e396b174d (diff)
downloadpleroma-e21afdb7c76c9773aeb51e37ff3bc2874e7a74f7.tar.gz
pleroma-e21afdb7c76c9773aeb51e37ff3bc2874e7a74f7.zip
Merge branch 'develop' into issue/1411
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)