Fix note count test
authorrinpatch <rinpatch@sdf.org>
Wed, 17 Apr 2019 12:03:17 +0000 (15:03 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 17 Apr 2019 12:03:17 +0000 (15:03 +0300)
test/web/activity_pub/activity_pub_test.exs

index 68bfb3858f7a89f2199da7f47bbf638353cf17b7..0ab29742a6930b57c4a3636041484f9d46d87500 100644 (file)
@@ -775,10 +775,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
       {:ok, a4} =
         CommonAPI.post(User.get_by_id(user.id), %{"status" => "yeah", "visibility" => "direct"})
 
-      {:ok, _} = a1.data["object"]["id"] |> Object.get_by_ap_id() |> ActivityPub.delete()
-      {:ok, _} = a2.data["object"]["id"] |> Object.get_by_ap_id() |> ActivityPub.delete()
-      {:ok, _} = a3.data["object"]["id"] |> Object.get_by_ap_id() |> ActivityPub.delete()
-      {:ok, _} = a4.data["object"]["id"] |> Object.get_by_ap_id() |> ActivityPub.delete()
+      {:ok, _} = Object.normalize(a1) |> ActivityPub.delete()
+      {:ok, _} = Object.normalize(a2) |> ActivityPub.delete()
+      {:ok, _} = Object.normalize(a3) |> ActivityPub.delete()
+      {:ok, _} = Object.normalize(a4) |> ActivityPub.delete()
 
       user = User.get_by_id(user.id)
       assert user.info.note_count == 10