diff options
author | lain <lain@soykaf.club> | 2020-06-26 11:58:40 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-26 11:58:40 +0200 |
commit | c3383d4fab6181d9f605a6058805333611534398 (patch) | |
tree | 3c500d1eb3108bcae9aff4cd1bf137844a9fe827 /test | |
parent | 84f9ca19568777861ff9520cbef09a0259efd536 (diff) | |
download | pleroma-c3383d4fab6181d9f605a6058805333611534398.tar.gz pleroma-c3383d4fab6181d9f605a6058805333611534398.zip |
BlockValidator: Restore old behavior for incoming blocks.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/object_validator_test.exs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/web/activity_pub/object_validator_test.exs b/test/web/activity_pub/object_validator_test.exs index e96552763..a3d43ef3c 100644 --- a/test/web/activity_pub/object_validator_test.exs +++ b/test/web/activity_pub/object_validator_test.exs @@ -657,7 +657,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do describe "blocks" do setup do - user = insert(:user) + user = insert(:user, local: false) blocked = insert(:user) {:ok, valid_block, []} = Builder.block(user, blocked) @@ -680,5 +680,11 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do assert {:error, _cng} = ObjectValidator.validate(block, []) end + + test "returns an error if don't accept remote blocks", %{valid_block: valid_block} do + clear_config([:activitypub, :unfollow_blocked], false) + + assert {:error, _cng} = ObjectValidator.validate(valid_block, []) + end end end |