X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Factivity_representer_test.exs;h=a3a92ce5bf01d0e625dcc3e49de23f4e573e92ea;hb=8a41d34673532c03cf99a2334399b9436e245f1b;hp=16ee02abb667c4173dcd3f5b9256b2c70e630fcb;hpb=412a3d8a0f74ee3a46f9ba98d906c65c6c1c4da8;p=akkoma
diff --git a/test/web/ostatus/activity_representer_test.exs b/test/web/ostatus/activity_representer_test.exs
index 16ee02abb..a3a92ce5b 100644
--- a/test/web/ostatus/activity_representer_test.exs
+++ b/test/web/ostatus/activity_representer_test.exs
@@ -38,22 +38,23 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
test "a note activity" do
note_activity = insert(:note_activity)
+ object_data = Object.normalize(note_activity).data
user = User.get_cached_by_ap_id(note_activity.data["actor"])
expected = """
http://activitystrea.ms/schema/1.0/note
http://activitystrea.ms/schema/1.0/post
- #{note_activity.data["object"]["id"]}
+ #{object_data["id"]}
New note by #{user.nickname}
- #{note_activity.data["object"]["content"]}
- #{note_activity.data["object"]["published"]}
- #{note_activity.data["object"]["published"]}
+ #{object_data["content"]}
+ #{object_data["published"]}
+ #{object_data["published"]}
#{note_activity.data["context"]}
- #{note_activity.data["object"]["summary"]}
-
-
+ #{object_data["summary"]}
+
+
@@ -106,7 +107,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
test "an announce activity" do
note = insert(:note_activity)
user = insert(:user)
- object = Object.get_cached_by_ap_id(note.data["object"]["id"])
+ object = Object.normalize(note)
{:ok, announce, _object} = ActivityPub.announce(user, object)
@@ -125,7 +126,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
http://activitystrea.ms/schema/1.0/share
#{announce.data["id"]}
#{user.nickname} repeated a notice
- RT #{note.data["object"]["content"]}
+ RT #{object.data["content"]}
#{announce.data["published"]}
#{announce.data["published"]}
#{announce.data["context"]}