X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Fostatus_test.exs;h=ee2b79ffa6d8566783689fbf49255a7007fe4f81;hb=540dfb4617aaab400d0aeafa47d41544c00a2b83;hp=44d687d8e9a1a1d196548edae715447c9d9ddd04;hpb=763756f8790809d593c34dc78196d241d230658a;p=akkoma diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index 44d687d8e..ee2b79ffa 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -182,6 +182,13 @@ defmodule Pleroma.Web.OStatusTest do refute favorited_activity.local end + test "handle conversation references" do + incoming = File.read!("test/fixtures/mastodon_conversation.xml") + {:ok, [activity]} = OStatus.handle_incoming(incoming) + + assert activity.data["context"] == "tag:mastodon.social,2017-08-28:objectId=7876885:objectType=Conversation" + end + test "handle incoming favorites with locally available object - GS, websub" do note_activity = insert(:note_activity) @@ -346,4 +353,11 @@ defmodule Pleroma.Web.OStatusTest do assert {:ok, %User{}} = OStatus.insert_or_update_user(data) end + + test "it doesn't add nil in the do field" do + incoming = File.read!("test/fixtures/nil_mention_entry.xml") + {:ok, [activity]} = OStatus.handle_incoming(incoming) + + assert activity.data["to"] == ["http://localhost:4001/users/atarifrosch@social.stopwatchingus-heidelberg.de/followers", "https://www.w3.org/ns/activitystreams#Public"] + end end