summaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
Diffstat (limited to 'test/web')
-rw-r--r--test/web/ostatus/activity_representer_test.exs2
-rw-r--r--test/web/ostatus/ostatus_test.exs10
2 files changed, 11 insertions, 1 deletions
diff --git a/test/web/ostatus/activity_representer_test.exs b/test/web/ostatus/activity_representer_test.exs
index 10f9a9d0b..6cea9cff0 100644
--- a/test/web/ostatus/activity_representer_test.exs
+++ b/test/web/ostatus/activity_representer_test.exs
@@ -18,7 +18,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
expected = """
<activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
- <id>#{note_activity.data["object"]["id"]}</id>
+ <id>#{note_activity.data["id"]}</id>
<title>New note by #{user.nickname}</title>
<content type="html">#{note_activity.data["object"]["content"]}</content>
<published>#{inserted_at}</published>
diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs
index dffebf5a7..96f2cb4f3 100644
--- a/test/web/ostatus/ostatus_test.exs
+++ b/test/web/ostatus/ostatus_test.exs
@@ -13,6 +13,16 @@ defmodule Pleroma.Web.OStatusTest do
assert "http://pleroma.example.org:4000/users/lain3" in activity.data["to"]
end
+ test "handle incoming replies" do
+ incoming = File.read!("test/fixtures/incoming_note_activity_answer.xml")
+ {:ok, activity} = OStatus.handle_incoming(incoming)
+
+ assert activity.data["type"] == "Create"
+ assert activity.data["object"]["type"] == "Note"
+ assert activity.data["object"]["inReplyTo"] == "http://pleroma.example.org:4000/objects/55bce8fc-b423-46b1-af71-3759ab4670bc"
+ assert "http://pleroma.example.org:4000/users/lain5" in activity.data["to"]
+ end
+
describe "new remote user creation" do
test "make new user or find them based on an 'author' xml doc" do
incoming = File.read!("test/fixtures/user_name_only.xml")