Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / test / bbs / handler_test.exs
index 1386a2d169f377a7b12e92c157d907b0dcab46be..7d5d68d1132a3d5f2ab1f55f3da46b45dfff96b7 100644 (file)
@@ -2,9 +2,10 @@ defmodule Pleroma.BBS.HandlerTest do
   use Pleroma.DataCase
   alias Pleroma.Activity
   alias Pleroma.BBS.Handler
-  alias Pleroma.Web.CommonAPI
+  alias Pleroma.Object
   alias Pleroma.Repo
   alias Pleroma.User
+  alias Pleroma.Web.CommonAPI
 
   import ExUnit.CaptureIO
   import Pleroma.Factory
@@ -49,7 +50,8 @@ defmodule Pleroma.BBS.HandlerTest do
       )
 
     assert activity.actor == user.ap_id
-    assert activity.data["object"]["content"] == "this is a test post"
+    object = Object.normalize(activity)
+    assert object.data["content"] == "this is a test post"
   end
 
   test "replying" do
@@ -74,7 +76,8 @@ defmodule Pleroma.BBS.HandlerTest do
       )
 
     assert reply.actor == user.ap_id
-    assert reply.data["object"]["content"] == "this is a reply"
-    assert reply.data["object"]["inReplyTo"] == activity.data["object"]["id"]
+    object = Object.normalize(reply)
+    assert object.data["content"] == "this is a reply"
+    assert object.data["inReplyTo"] == activity.data["object"]
   end
 end