Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / test / web / mastodon_api / controllers / custom_emoji_controller_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.MastodonAPI.CustomEmojiControllerTest do
6 use Pleroma.Web.ConnCase, async: true
7
8 test "with tags", %{conn: conn} do
9 [emoji | _body] =
10 conn
11 |> get("/api/v1/custom_emojis")
12 |> json_response(200)
13
14 assert Map.has_key?(emoji, "shortcode")
15 assert Map.has_key?(emoji, "static_url")
16 assert Map.has_key?(emoji, "tags")
17 assert is_list(emoji["tags"])
18 assert Map.has_key?(emoji, "category")
19 assert Map.has_key?(emoji, "url")
20 assert Map.has_key?(emoji, "visible_in_picker")
21 end
22 end