Web.ActivityPub.ActivityPubTest: test against inserting activities with content: null

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-01-26 04:23:52 +01:00
parent 15aa45ae8a
commit 499a4591a4
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE

View 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)