aboutsummaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-04-20 14:08:54 +0200
committerlain <lain@soykaf.club>2020-04-20 14:08:54 +0200
commit7e53da250e3b41e01073148efea0fc4f49dea9d5 (patch)
tree91a692a3e7fcf703241b2fea4398ea7c32f07b48 /test/web/common_api/common_api_test.exs
parentb836d3d104f75841d71f9cf7c5c8cb5c07ba7294 (diff)
downloadpleroma-7e53da250e3b41e01073148efea0fc4f49dea9d5.tar.gz
ChatMessage: Support emoji.
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index c17e30210..86b3648ac 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -33,7 +33,7 @@ defmodule Pleroma.Web.CommonAPITest do
CommonAPI.post_chat_message(
author,
recipient,
- "a test message <script>alert('uuu')</script>"
+ "a test message <script>alert('uuu')</script> :firefox:"
)
assert activity.data["type"] == "Create"
@@ -44,7 +44,11 @@ defmodule Pleroma.Web.CommonAPITest do
assert object.data["to"] == [recipient.ap_id]
assert object.data["content"] ==
- "a test message &lt;script&gt;alert(&#39;uuu&#39;)&lt;/script&gt;"
+ "a test message &lt;script&gt;alert(&#39;uuu&#39;)&lt;/script&gt; :firefox:"
+
+ assert object.data["emoji"] == %{
+ "firefox" => "http://localhost:4001/emoji/Firefox.gif"
+ }
assert Chat.get(author.id, recipient.ap_id)
assert Chat.get(recipient.id, author.ap_id)