Merge branch 'feauture/webfinger' into 'develop'
[akkoma] / test / web / ostatus / ostatus_test.exs
index 44d687d8e9a1a1d196548edae715447c9d9ddd04..8dd3c3b54c65d77a8cf50a772ad92c1636191246 100644 (file)
@@ -346,4 +346,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