summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2022-11-05 23:36:10 -0400
committertusooa <tusooa@kazv.moe>2023-01-06 14:01:42 -0500
commit686fef59db4c2489b8de1d6aa7f9f06066ff06bc (patch)
treefbe8c8079b091a3c9cb2ed1c9ad0155dc20f0926
parent2bc6911139a3aee68bc29d3c9838c7730d5ae706 (diff)
downloadpleroma-686fef59db4c2489b8de1d6aa7f9f06066ff06bc.tar.gz
pleroma-686fef59db4c2489b8de1d6aa7f9f06066ff06bc.zip
Test that zwnj is treated as word char in hashtags
-rw-r--r--test/pleroma/web/common_api_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 44355c26d..2876d4093 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -518,6 +518,15 @@ defmodule Pleroma.Web.CommonAPITest do
assert Object.tags(object) == ["2hu"]
end
+ test "zwnj is treated as word character" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "#ساٴين‌س"})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert Object.tags(object) == ["ساٴين‌س"]
+ end
+
test "it adds emoji in the object" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})