BBS: Fix tests.

This commit is contained in:
lain 2019-05-04 15:36:48 +02:00
parent c9d1cb2dce
commit c58fd4c038

View File

@ -3,6 +3,7 @@ defmodule Pleroma.BBS.HandlerTest do
alias Pleroma.Activity alias Pleroma.Activity
alias Pleroma.BBS.Handler alias Pleroma.BBS.Handler
alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI
alias Pleroma.Object
alias Pleroma.Repo alias Pleroma.Repo
alias Pleroma.User alias Pleroma.User
@ -49,7 +50,8 @@ defmodule Pleroma.BBS.HandlerTest do
) )
assert activity.actor == user.ap_id 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 end
test "replying" do test "replying" do
@ -74,7 +76,8 @@ defmodule Pleroma.BBS.HandlerTest do
) )
assert reply.actor == user.ap_id assert reply.actor == user.ap_id
assert reply.data["object"]["content"] == "this is a reply" object = Object.normalize(reply)
assert reply.data["object"]["inReplyTo"] == activity.data["object"]["id"] assert object.data["content"] == "this is a reply"
assert object.data["inReplyTo"] == activity.data["object"]
end end
end end