summaryrefslogtreecommitdiff
path: root/test/bbs/handler_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-07-09 20:00:37 +0000
committerrinpatch <rinpatch@sdf.org>2019-07-09 20:00:37 +0000
commit81f1017b84bbe1a493aaf6f43687af2f2546b6a1 (patch)
treebb2d77d97f46f51c7d3b3e719fe29faac41432af /test/bbs/handler_test.exs
parent2bb945cb70751bc8e72c036040130bb54c32f391 (diff)
parent8a41d34673532c03cf99a2334399b9436e245f1b (diff)
downloadpleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.tar.gz
pleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.zip
Merge branch '878-activity-object-decoupling-in-tests' into 'develop'
[#878] Refactored assumptions on embedded object presence in tests Closes #878 See merge request pleroma/pleroma!1390
Diffstat (limited to 'test/bbs/handler_test.exs')
-rw-r--r--test/bbs/handler_test.exs8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/bbs/handler_test.exs b/test/bbs/handler_test.exs
index 7d5d68d11..6f6533e3d 100644
--- a/test/bbs/handler_test.exs
+++ b/test/bbs/handler_test.exs
@@ -59,6 +59,7 @@ defmodule Pleroma.BBS.HandlerTest do
another_user = insert(:user)
{:ok, activity} = CommonAPI.post(another_user, %{"status" => "this is a test post"})
+ activity_object = Object.normalize(activity)
output =
capture_io(fn ->
@@ -76,8 +77,9 @@ defmodule Pleroma.BBS.HandlerTest do
)
assert reply.actor == user.ap_id
- object = Object.normalize(reply)
- assert object.data["content"] == "this is a reply"
- assert object.data["inReplyTo"] == activity.data["object"]
+
+ reply_object_data = Object.normalize(reply).data
+ assert reply_object_data["content"] == "this is a reply"
+ assert reply_object_data["inReplyTo"] == activity_object.data["id"]
end
end