diff options
author | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:09:10 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:09:10 +0000 |
commit | a0f5e8b27edbe2224d9c2c3997ad5b8ea484244b (patch) | |
tree | 4a7a0f02e5880b7dff3ac20eaf59d71c7b584e5e /test/web/common_api/common_api_test.exs | |
parent | 425324aae3d4534bc045466a1cc15653ddfa27d2 (diff) | |
parent | 34afc2b0745b39861d9381e69cdb4b9c158f86ee (diff) | |
download | pleroma-2.1.2.tar.gz |
Merge branch 'release/2.1.2' into 'stable'v2.1.2
Release/2.1.2
See merge request pleroma/secteam/pleroma!17
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 4ba6232dc..28bb6db30 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -213,6 +213,17 @@ defmodule Pleroma.Web.CommonAPITest do assert message == :content_too_long end + + test "it reject messages via MRF" do + clear_config([:mrf_keyword, :reject], ["GNO"]) + clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.KeywordPolicy]) + + author = insert(:user) + recipient = insert(:user) + + assert {:reject, "[KeywordPolicy] Matches with rejected keyword"} == + CommonAPI.post_chat_message(author, recipient, "GNO/Linux") + end end describe "unblocking" do |