2019-10-02 12:16:34 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
2020-03-03 22:44:49 +00:00
|
|
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
2019-10-02 12:16:34 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Pleroma.Web.MastodonAPI.CustomEmojiControllerTest do
|
|
|
|
use Pleroma.Web.ConnCase, async: true
|
|
|
|
|
|
|
|
test "with tags", %{conn: conn} do
|
2020-04-13 17:21:04 +00:00
|
|
|
assert resp =
|
|
|
|
conn
|
|
|
|
|> get("/api/v1/custom_emojis")
|
2020-04-24 10:46:59 +00:00
|
|
|
|> json_response_and_validate_schema(200)
|
2019-10-02 12:16:34 +00:00
|
|
|
|
2020-04-13 17:21:04 +00:00
|
|
|
assert [emoji | _body] = resp
|
2019-10-02 12:16:34 +00:00
|
|
|
assert Map.has_key?(emoji, "shortcode")
|
|
|
|
assert Map.has_key?(emoji, "static_url")
|
|
|
|
assert Map.has_key?(emoji, "tags")
|
|
|
|
assert is_list(emoji["tags"])
|
|
|
|
assert Map.has_key?(emoji, "category")
|
|
|
|
assert Map.has_key?(emoji, "url")
|
|
|
|
assert Map.has_key?(emoji, "visible_in_picker")
|
2020-04-13 17:21:04 +00:00
|
|
|
end
|
2019-10-02 12:16:34 +00:00
|
|
|
end
|