X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Ftransmogrifier%2Fuser_update_handling_test.exs;h=b1a0647729d4f269a1e70a73de584f8e41deb748;hb=218c51960606454577a12fb6e417d66ab46f3965;hp=64636656cab11a0ffe6610a7478ed47e427c6d92;hpb=7d8f610720abdadeff9238aa8a345a91e473e0fa;p=akkoma
diff --git a/test/pleroma/web/activity_pub/transmogrifier/user_update_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/user_update_handling_test.exs
index 64636656c..b1a064772 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/user_update_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/user_update_handling_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
test "it works for incoming update activities" do
user = insert(:user, local: false)
- update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
+ update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
object =
update_data["object"]
@@ -58,7 +58,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
{:ok, _activity} =
"test/fixtures/mastodon-update.json"
|> File.read!()
- |> Poison.decode!()
+ |> Jason.decode!()
|> Map.put("actor", actor)
|> Map.update!("object", fn object ->
object
@@ -82,7 +82,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
assert user.fields == []
- update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
+ update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
object =
update_data["object"]
@@ -103,7 +103,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
%{"name" => "foo1", "value" => "updated"}
]
- Pleroma.Config.put([:instance, :max_remote_account_fields], 2)
+ clear_config([:instance, :max_remote_account_fields], 2)
update_data =
update_data
@@ -138,7 +138,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
test "it works for incoming update activities which lock the account" do
user = insert(:user, local: false)
- update_data = File.read!("test/fixtures/mastodon-update.json") |> Poison.decode!()
+ update_data = File.read!("test/fixtures/mastodon-update.json") |> Jason.decode!()
object =
update_data["object"]
@@ -154,6 +154,6 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
{:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(update_data)
user = User.get_cached_by_ap_id(user.ap_id)
- assert user.locked == true
+ assert user.is_locked == true
end
end