Adding tag to emoji ets table
[akkoma] / test / emoji_test.exs
1 defmodule Pleroma.EmojiTest do
2 use ExUnit.Case, async: true
3 alias Pleroma.Emoji
4
5 describe "get_all/0" do
6 setup do
7 emoji_list = Emoji.get_all()
8 {:ok, emoji_list: emoji_list}
9 end
10 test "first emoji", %{emoji_list: emoji_list} do
11 [emoji | _others] = emoji_list
12 {code, path, tags} = emoji
13
14 assert tuple_size(emoji) == 3
15 assert is_binary(code)
16 assert is_binary(path)
17 assert is_binary(tags)
18 end
19
20 test "random emoji", %{emoji_list: emoji_list} do
21 emoji = Enum.random(emoji_list)
22 {code, path, tags} = emoji
23
24 assert tuple_size(emoji) == 3
25 assert is_binary(code)
26 assert is_binary(path)
27 assert is_binary(tags)
28 end
29 end
30 end