Test double dot link

This commit is contained in:
tusooa 2023-01-06 14:11:56 -05:00
parent 0e89a9ad15
commit f2ed05191c
No known key found for this signature in database
GPG Key ID: 7B467EDE43A08224
1 changed files with 10 additions and 0 deletions

View File

@ -527,6 +527,16 @@ test "zwnj is treated as word character" do
assert Object.tags(object) == ["ساٴين‌س"] assert Object.tags(object) == ["ساٴين‌س"]
end end
test "double dot in link is allowed" do
user = insert(:user)
text = "https://example.to/something..mp3"
{:ok, activity} = CommonAPI.post(user, %{status: text})
object = Object.normalize(activity, fetch: false)
assert object.data["content"] == "<a href=\"#{text}\" rel=\"ugc\">#{text}</a>"
end
test "it adds emoji in the object" do test "it adds emoji in the object" do
user = insert(:user) user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"}) {:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})