aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2019-03-07 12:20:04 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2019-03-07 12:20:04 +0000
commit3c5926fe913287ee00a0efb93d2a8ecbddfd26c7 (patch)
tree6190acbf0f7f2a0db44a10b39a2ae25f91550bfc /test
parente53a9fd15e6749c87193f829f4d33fea1406a21f (diff)
downloadpleroma-3c5926fe913287ee00a0efb93d2a8ecbddfd26c7.tar.gz
tests: add regression test
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/mrf/anti_followbot_policy_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/web/activity_pub/mrf/anti_followbot_policy_test.exs b/test/web/activity_pub/mrf/anti_followbot_policy_test.exs
index 2ea4f9d3f..37a7bfcf7 100644
--- a/test/web/activity_pub/mrf/anti_followbot_policy_test.exs
+++ b/test/web/activity_pub/mrf/anti_followbot_policy_test.exs
@@ -54,4 +54,19 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicyTest do
{:ok, _} = AntiFollowbotPolicy.filter(message)
end
+
+ test "it gracefully handles nil display names" do
+ actor = insert(:user, %{name: nil})
+ target = insert(:user)
+
+ message = %{
+ "@context" => "https://www.w3.org/ns/activitystreams",
+ "type" => "Follow",
+ "actor" => actor.ap_id,
+ "object" => target.ap_id,
+ "id" => "https://example.com/activities/1234"
+ }
+
+ {:ok, _} = AntiFollowbotPolicy.filter(message)
+ end
end