logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

custom_emoji_controller_test.exs (776B)


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