Web.ActivityPub.ActivityPubTest: test against inserting activities with content:...
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 26 Jan 2019 03:23:52 +0000 (04:23 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 26 Jan 2019 03:23:52 +0000 (04:23 +0100)
test/web/activity_pub/activity_pub_test.exs

index d2e54d8049a80e25b50ac400fc435693918ad6a9..91548ab5f1d2805ddfdc0f4df2db50bf2ff66027 100644 (file)
@@ -85,6 +85,17 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest 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)