diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-04-26 10:22:51 +0200 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2017-04-26 10:22:51 +0200 |
| commit | f1ebf812eede5b77931d2315757a7ad8e0ea5a7e (patch) | |
| tree | 49927aaa3f5028b8fadba4a05d1b5cd761dd7167 /test/web | |
| parent | d9ebd785ab7d9b371ba5accdc6ca5d72af7b509d (diff) | |
| download | pleroma-f1ebf812eede5b77931d2315757a7ad8e0ea5a7e.tar.gz pleroma-f1ebf812eede5b77931d2315757a7ad8e0ea5a7e.zip | |
Add inReplyTo to incoming messages.
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/ostatus/ostatus_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
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") |
