ActivityPub.Utils: Fix undo test.
authorlain <lain@soykaf.club>
Fri, 4 Oct 2019 15:10:49 +0000 (17:10 +0200)
committerAriadne Conill <ariadne@dereferenced.org>
Fri, 4 Oct 2019 21:17:52 +0000 (21:17 +0000)
test/web/activity_pub/utils_test.exs

index eb429b2c48530d9eb33a7be002e6646844e4ac0a..db6c68c44bd8ee6e45e15468e911927f7c9fc8e7 100644 (file)
@@ -94,11 +94,13 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
       user = insert(:user)
       like_activity = insert(:like_activity, data_attrs: %{"context" => "test context"})
 
+      object = Object.normalize(like_activity.data["object"])
+
       assert Utils.make_unlike_data(user, like_activity, nil) == %{
                "type" => "Undo",
                "actor" => user.ap_id,
                "object" => like_activity.data,
-               "to" => [user.follower_address, like_activity.data["actor"]],
+               "to" => [user.follower_address, object.data["actor"]],
                "cc" => [Pleroma.Constants.as_public()],
                "context" => like_activity.data["context"]
              }
@@ -107,7 +109,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
                "type" => "Undo",
                "actor" => user.ap_id,
                "object" => like_activity.data,
-               "to" => [user.follower_address, like_activity.data["actor"]],
+               "to" => [user.follower_address, object.data["actor"]],
                "cc" => [Pleroma.Constants.as_public()],
                "context" => like_activity.data["context"],
                "id" => "9mJEZK0tky1w2xD2vY"