summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/create-chat-message.json12
-rw-r--r--test/web/activity_pub/transmogrifier/chat_message_test.exs1
2 files changed, 13 insertions, 0 deletions
diff --git a/test/fixtures/create-chat-message.json b/test/fixtures/create-chat-message.json
index 6db5b9f5c..9c23a1c9b 100644
--- a/test/fixtures/create-chat-message.json
+++ b/test/fixtures/create-chat-message.json
@@ -9,6 +9,18 @@
"to": [
"http://2hu.gensokyo/users/marisa"
],
+ "tag": [
+ {
+ "icon": {
+ "type": "Image",
+ "url": "http://2hu.gensokyo/emoji/Firefox.gif"
+ },
+ "id": "http://2hu.gensokyo/emoji/Firefox.gif",
+ "name": ":firefox:",
+ "type": "Emoji",
+ "updated": "1970-01-01T00:00:00Z"
+ }
+ ],
"type": "ChatMessage"
},
"published": "2018-02-12T14:08:20Z",
diff --git a/test/web/activity_pub/transmogrifier/chat_message_test.exs b/test/web/activity_pub/transmogrifier/chat_message_test.exs
index 4d6f24609..a63a31e6e 100644
--- a/test/web/activity_pub/transmogrifier/chat_message_test.exs
+++ b/test/web/activity_pub/transmogrifier/chat_message_test.exs
@@ -75,6 +75,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.ChatMessageTest do
assert object
assert object.data["content"] == "You expected a cute girl? Too bad. alert('XSS')"
+ assert match?(%{"firefox" => _}, object.data["emoji"])
refute Chat.get(author.id, recipient.ap_id)
assert Chat.get(recipient.id, author.ap_id)