diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-04-29 11:51:49 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-04-30 14:20:54 -0500 |
commit | c16c7fdb8794df8558cf8fbe4231d8f9ec01bb6d (patch) | |
tree | 1acfbf6a393f00d3025567d17e5b94c48e85cb02 /test | |
parent | 3d742c3c1af69a9526c12a171663630b3439b5cc (diff) | |
download | pleroma-c16c7fdb8794df8558cf8fbe4231d8f9ec01bb6d.tar.gz |
SimplePolicy: filter string Objects
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/activity_pub/mrf/simple_policy_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs b/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs index b6d9f2ded..8024a2459 100644 --- a/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs +++ b/test/pleroma/web/activity_pub/mrf/simple_policy_test.exs @@ -272,6 +272,18 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicyTest do assert {:reject, _} = SimplePolicy.filter(announce) end + + test "reject by URI object" do + clear_config([:mrf_simple, :reject], ["blocked.tld"]) + + announce = %{ + "type" => "Announce", + "actor" => "https://okay.tld/users/alice", + "object" => "https://blocked.tld/activities/1" + } + + assert {:reject, _} = SimplePolicy.filter(announce) + end end describe "when :followers_only" do |