From 1a001588e80e1ff7088472e3faaf754617d63973 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Thu, 24 Aug 2017 12:54:01 +0200 Subject: Don't break on empty mentions. --- test/web/ostatus/ostatus_test.exs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index 44d687d8e..8dd3c3b54 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -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 -- cgit v1.2.3