aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-01-26 13:41:18 +0000
committerkaniini <nenolod@gmail.com>2019-01-26 13:41:18 +0000
commitb050d27c2d667d3c61e2c5716d26971f24b4bc5c (patch)
tree9c1c91eb75c7981ee0e40967f9c010777ddc2389 /test
parent6383fa3a5d1a269315001b445dafc73a059dd8cb (diff)
parent499a4591a4689094bff597e30ce599a6fc189ea3 (diff)
downloadpleroma-b050d27c2d667d3c61e2c5716d26971f24b4bc5c.tar.gz
Merge branch 'bugfix/content_nil_lenght_check' into 'develop'
Web.ActivityPub.ActivityPub: Fix check_remote_limit/1 against activities with content: nil See merge request pleroma/pleroma!711
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs11
1 files changed, 11 insertions, 0 deletions
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 @@ 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)