diff options
author | tusooa <tusooa@kazv.moe> | 2023-06-13 14:55:27 -0400 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2023-07-07 06:58:32 -0400 |
commit | d670dbdbd3e675b7d29c97e8bfd5301dcf3c9de0 (patch) | |
tree | c92a1078b85809b901ca9f58473a35bc77a2f0af | |
parent | ef8a6c539a98633d1a78fa42379952b93f847309 (diff) | |
download | pleroma-d670dbdbd3e675b7d29c97e8bfd5301dcf3c9de0.tar.gz pleroma-d670dbdbd3e675b7d29c97e8bfd5301dcf3c9de0.zip |
Test that unicode emoji reactions are not affected
-rw-r--r-- | test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs b/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs index ae4c44f1c..121ee1ea0 100644 --- a/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs +++ b/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs @@ -133,6 +133,14 @@ defmodule Pleroma.Web.ActivityPub.MRF.EmojiPolicyTest do "cc" => ["https://example.org/someone"] } + @emoji_react_data_unicode %{ + "type" => "EmojiReact", + "content" => "😍", + "object" => "https://example.org/someobject", + "to" => ["https://example.org/self"], + "cc" => ["https://example.org/someone"] + } + describe "remove_url" do setup do clear_config([:mrf_emoji, :remove_url], [ @@ -217,6 +225,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.EmojiPolicyTest do assert {:ok, @emoji_react_data_matching_nothing} == MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_nothing) + + assert {:ok, @emoji_react_data_unicode} == + MRF.filter_one(EmojiPolicy, @emoji_react_data_unicode) end end @@ -304,6 +315,9 @@ defmodule Pleroma.Web.ActivityPub.MRF.EmojiPolicyTest do assert {:ok, @emoji_react_data_matching_nothing} == MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_nothing) + + assert {:ok, @emoji_react_data_unicode} == + MRF.filter_one(EmojiPolicy, @emoji_react_data_unicode) end end |