diff options
author | rinpatch <rinpatch@sdf.org> | 2020-09-17 12:13:36 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-09-17 19:48:33 +0300 |
commit | 22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3 (patch) | |
tree | 957224ba165c8fa73fa5f7dcfe7b97bcf7e35d1d /test/web/common_api/common_api_test.exs | |
parent | eff7f9892dbb042a447fd83e1ce5e9cb69941cf6 (diff) | |
download | pleroma-22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3.tar.gz pleroma-22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3.zip |
Merge branch 'bugfix/mrf-ingestion' into 'develop'
Bugfix: MRF and Pipeline Ingestion
See merge request pleroma/secteam/pleroma!15
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 |