aboutsummaryrefslogtreecommitdiff
path: root/test/web/twitter_api
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-04-10 06:22:51 +0000
committerlambda <lain@soykaf.club>2019-04-10 06:22:51 +0000
commitc8440b5e0c97c5d5c03e4b99e30a61df6ab95319 (patch)
treeb52b9e6306b5e237fa3b5dbea375bf89f53d5c11 /test/web/twitter_api
parent0ab563d3341f7cf9bb3e9f85a869499701cbb7d9 (diff)
parentb57b43027cf958d3a3a82b95f155ae27b235b543 (diff)
downloadpleroma-c8440b5e0c97c5d5c03e4b99e30a61df6ab95319.tar.gz
Merge branch 'fix/emoji-api-nonsense' into 'develop'
Change response format of /api/pleroma/emoji so it makes sense See merge request pleroma/pleroma!1038
Diffstat (limited to 'test/web/twitter_api')
-rw-r--r--test/web/twitter_api/util_controller_test.exs21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/web/twitter_api/util_controller_test.exs b/test/web/twitter_api/util_controller_test.exs
index 01af8c1df..a4b3d651a 100644
--- a/test/web/twitter_api/util_controller_test.exs
+++ b/test/web/twitter_api/util_controller_test.exs
@@ -193,22 +193,19 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
describe "/api/pleroma/emoji" do
test "returns json with custom emoji with tags", %{conn: conn} do
- [emoji | _body] =
+ emoji =
conn
|> get("/api/pleroma/emoji")
|> json_response(200)
- [key] = Map.keys(emoji)
-
- %{
- ^key => %{
- "image_url" => url,
- "tags" => tags
- }
- } = emoji
-
- assert is_binary(url)
- assert is_list(tags)
+ assert Enum.all?(emoji, fn
+ {_key,
+ %{
+ "image_url" => url,
+ "tags" => tags
+ }} ->
+ is_binary(url) and is_list(tags)
+ end)
end
end