Merge remote-tracking branch 'upstream/develop' into restrict-domain
[akkoma] / test / pleroma / 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 assert resp =
10 conn
11 |> get("/api/v1/custom_emojis")
12 |> json_response_and_validate_schema(200)
13
14 assert [emoji | _body] = resp
15 assert Map.has_key?(emoji, "shortcode")
16 assert Map.has_key?(emoji, "static_url")
17 assert Map.has_key?(emoji, "tags")
18 assert is_list(emoji["tags"])
19 assert Map.has_key?(emoji, "category")
20 assert Map.has_key?(emoji, "url")
21 assert Map.has_key?(emoji, "visible_in_picker")
22 end
23 end