diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-04-30 11:39:27 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-04-30 11:39:27 +0200 |
commit | 84027ff00b7fc63934f12129f84b5c7ee1d39248 (patch) | |
tree | d67da56d25ca255c81e87a51977d3cd2c2a79aa4 /test/web | |
parent | d937a8e69567ace33a72d5248c046860305076d7 (diff) | |
download | pleroma-84027ff00b7fc63934f12129f84b5c7ee1d39248.tar.gz pleroma-84027ff00b7fc63934f12129f84b5c7ee1d39248.zip |
Handle comments.
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/ostatus/ostatus_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index a53e0ebde..5452e5888 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -24,6 +24,17 @@ defmodule Pleroma.Web.OStatusTest do assert activity.data["object"]["content"] == "Will it blend?" end + test "handle incoming notes - GS, subscription, reply" do + incoming = File.read!("test/fixtures/ostatus_incoming_reply.xml") + {:ok, [activity]} = OStatus.handle_incoming(incoming) + + assert activity.data["type"] == "Create" + assert activity.data["object"]["type"] == "Note" + assert activity.data["object"]["actor"] == "https://social.heldscal.la/user/23211" + assert activity.data["object"]["content"] == "@<a href=\"https://gs.archae.me/user/4687\" class=\"h-card u-url p-nickname mention\" title=\"shpbot\">shpbot</a> why not indeed." + assert activity.data["object"]["inReplyTo"] == "tag:gs.archae.me,2017-04-30:noticeId=778260:objectType=note" + end + test "handle incoming replies" do incoming = File.read!("test/fixtures/incoming_note_activity_answer.xml") {:ok, [activity]} = OStatus.handle_incoming(incoming) |