X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Factivity_pub%2Ftransmogrifier%2Faccept_handling_test.exs;h=58490076d6ac18075e24de288763a497011a747e;hb=8d6cc6cb65d8216d9f8d75e274e23fc78b75639c;hp=77d468f5c98351b00a58ebc4dc9f8532d7aa8d12;hpb=4ead0d564fa60b1a908f6237474250d6bda85ae9;p=akkoma diff --git a/test/pleroma/web/activity_pub/transmogrifier/accept_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/accept_handling_test.exs index 77d468f5c..58490076d 100644 --- a/test/pleroma/web/activity_pub/transmogrifier/accept_handling_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier/accept_handling_test.exs @@ -1,9 +1,9 @@ # 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.AcceptHandlingTest do - use Pleroma.DataCase + use Pleroma.DataCase, async: true alias Pleroma.User alias Pleroma.Web.ActivityPub.Transmogrifier @@ -15,14 +15,14 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do follower = insert(:user) followed = insert(:user) - {:ok, follower} = User.follow(follower, followed) + {:ok, follower, followed} = User.follow(follower, followed) assert User.following?(follower, followed) == true {:ok, _, _, follow_activity} = CommonAPI.follow(follower, followed) accept_data = File.read!("test/fixtures/mastodon-accept-activity.json") - |> Poison.decode!() + |> Jason.decode!() |> Map.put("actor", followed.ap_id) object = @@ -46,13 +46,13 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do test "it works for incoming accepts which are referenced by IRI only" do follower = insert(:user) - followed = insert(:user, locked: true) + followed = insert(:user, is_locked: true) {:ok, _, _, follow_activity} = CommonAPI.follow(follower, followed) accept_data = File.read!("test/fixtures/mastodon-accept-activity.json") - |> Poison.decode!() + |> Jason.decode!() |> Map.put("actor", followed.ap_id) |> Map.put("object", follow_activity.data["id"]) @@ -72,11 +72,11 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do test "it fails for incoming accepts which cannot be correlated" do follower = insert(:user) - followed = insert(:user, locked: true) + followed = insert(:user, is_locked: true) accept_data = File.read!("test/fixtures/mastodon-accept-activity.json") - |> Poison.decode!() + |> Jason.decode!() |> Map.put("actor", followed.ap_id) accept_data =