diff options
author | rinpatch <rinpatch@sdf.org> | 2019-03-07 16:42:05 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-03-07 16:42:05 +0000 |
commit | 2a9191a53eda9a2e1b067774804db54fc3eda5d0 (patch) | |
tree | e3e9f31eb7b8032995a37e171e86baaa03c57696 /test | |
parent | 8e9f6d8f6954f3eb3f3b4b371ae9e886d88e2f0d (diff) | |
parent | 3c5926fe913287ee00a0efb93d2a8ecbddfd26c7 (diff) | |
download | pleroma-2a9191a53eda9a2e1b067774804db54fc3eda5d0.tar.gz |
Merge branch 'bugfix/mrf-antifollowbot-nil-bio' into 'develop'
MRF: anti followbot: gracefully handle nil display names
See merge request pleroma/pleroma!909
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/mrf/anti_followbot_policy_test.exs | 15 |
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 |