From 499a4591a4689094bff597e30ce599a6fc189ea3 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sat, 26 Jan 2019 04:23:52 +0100
Subject: [PATCH] Web.ActivityPub.ActivityPubTest: test against inserting
 activities with content: null

---
 test/web/activity_pub/activity_pub_test.exs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index d2e54d804..91548ab5f 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -85,6 +85,17 @@ test "drops activities beyond a certain limit" do
       assert {:error, {:remote_limit_error, _}} = ActivityPub.insert(data)
     end
 
+    test "doesn't drop activities with content being null" do
+      data = %{
+        "ok" => true,
+        "object" => %{
+          "content" => nil
+        }
+      }
+
+      assert {:ok, _} = ActivityPub.insert(data)
+    end
+
     test "returns the activity if one with the same id is already in" do
       activity = insert(:note_activity)
       {:ok, new_activity} = ActivityPub.insert(activity.data)