diff options
author | lain <lain@soykaf.club> | 2024-06-12 09:15:14 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2024-06-12 09:15:14 +0000 |
commit | 38e6166d93b26b34d2efe38cc65d0217ad994527 (patch) | |
tree | 3844903798e80281d694f19cde6ca1d04c0dced6 /test | |
parent | 4a28b81b591d6b87fa27378744052ccf8be44308 (diff) | |
parent | 1ae5c2b020810eda7243e7e6b52cf89e6bb7f8d0 (diff) | |
download | pleroma-38e6166d93b26b34d2efe38cc65d0217ad994527.tar.gz pleroma-38e6166d93b26b34d2efe38cc65d0217ad994527.zip |
Merge branch '3280-emoji' into 'develop'
Transmogrifier: Encode Emoji id to be valid.
Closes #3280
See merge request pleroma/pleroma!4147
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/activity_pub/transmogrifier/emoji_tag_building_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/transmogrifier/emoji_tag_building_test.exs b/test/pleroma/web/activity_pub/transmogrifier/emoji_tag_building_test.exs new file mode 100644 index 000000000..c632c199c --- /dev/null +++ b/test/pleroma/web/activity_pub/transmogrifier/emoji_tag_building_test.exs @@ -0,0 +1,14 @@ +defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiTagBuildingTest do + use Pleroma.DataCase, async: true + + alias Pleroma.Web.ActivityPub.Transmogrifier + + test "it encodes the id to be a valid url" do + name = "hanapog" + url = "https://misskey.local.live/emojis/hana pog.png" + + tag = Transmogrifier.build_emoji_tag({name, url}) + + assert tag["id"] == "https://misskey.local.live/emojis/hana%20pog.png" + end +end |