summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-09-17 12:13:36 +0000
committerrinpatch <rinpatch@sdf.org>2020-09-17 19:48:33 +0300
commit22d49993d9ab35ff5d5276a6a1f4aec96d03b7f3 (patch)
tree957224ba165c8fa73fa5f7dcfe7b97bcf7e35d1d /test/web/common_api/common_api_test.exs
parenteff7f9892dbb042a447fd83e1ce5e9cb69941cf6 (diff)
downloadpleroma-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.exs11
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