diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 22:22:59 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 22:22:59 +0300 |
commit | a42880040574701000470fc1c2dbd6f7242c1a06 (patch) | |
tree | 666d244b9bf4f38b4421deea8d3b8bbb10ec179e /test/web/common_api/common_api_test.exs | |
parent | d9fb5bc08ad67b55d0cd25c1a0d7d3a740758427 (diff) | |
parent | 7bf269fe836ded974d2187c6b36eba4ab185ff25 (diff) | |
download | pleroma-a42880040574701000470fc1c2dbd6f7242c1a06.tar.gz pleroma-a42880040574701000470fc1c2dbd6f7242c1a06.zip |
Merge remote-tracking branch 'remotes/origin/develop' into media-preview-proxy-nostream
# Conflicts:
# CHANGELOG.md
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 f5559f932..2eab64e8b 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -217,6 +217,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 |