Merge branch 'stream-follow-updates' into 'develop'
[akkoma] / test / pleroma / web / activity_pub / transmogrifier / answer_handling_test.exs
index 0f6605c3f2e274a79ec3d629ab4d61210667dd45..a1c2ba28a69a9bc6a9b627ed84511ea8e5f2375d 100644 (file)
@@ -27,10 +27,11 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnswerHandlingTest do
       })
 
     object = Object.normalize(activity)
+    assert object.data["repliesCount"] == nil
 
     data =
       File.read!("test/fixtures/mastodon-vote.json")
-      |> Poison.decode!()
+      |> Jason.decode!()
       |> Kernel.put_in(["to"], user.ap_id)
       |> Kernel.put_in(["object", "inReplyTo"], object.data["id"])
       |> Kernel.put_in(["object", "to"], user.ap_id)
@@ -41,7 +42,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnswerHandlingTest do
     assert answer_object.data["inReplyTo"] == object.data["id"]
 
     new_object = Object.get_by_ap_id(object.data["id"])
-    assert new_object.data["replies_count"] == object.data["replies_count"]
+    assert new_object.data["repliesCount"] == nil
 
     assert Enum.any?(
              new_object.data["oneOf"],
@@ -65,7 +66,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AnswerHandlingTest do
     # TODO: Replace with CommonAPI vote creation when implemented
     data =
       File.read!("test/fixtures/mastodon-vote.json")
-      |> Poison.decode!()
+      |> Jason.decode!()
       |> Kernel.put_in(["to"], user.ap_id)
       |> Kernel.put_in(["object", "inReplyTo"], poll_object.data["id"])
       |> Kernel.put_in(["object", "to"], user.ap_id)