Adding tag to emoji ets table

changes in apis
This commit is contained in:
Alex S 2019-04-01 17:17:57 +07:00
commit 3601f03147
14 changed files with 165 additions and 25 deletions

View file

@ -164,4 +164,25 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
assert response == Jason.encode!(config |> Enum.into(%{})) |> Jason.decode!()
end
end
describe "/api/pleroma/emoji" do
test "returns json with custom emoji with tags", %{conn: conn} do
[emoji | _body] =
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)
end
end
end