diff options
author | lain <lain@soykaf.club> | 2019-09-13 02:11:02 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-13 02:11:02 +0200 |
commit | a697f0d79148358da828d24ebfe12bbb9bb33b34 (patch) | |
tree | 51061a30872baaa86cd255c7eeadd4ada52a7eb9 /test | |
parent | 8d4b661ecb549ba554815ca55a29ec5872c68380 (diff) | |
download | pleroma-a697f0d79148358da828d24ebfe12bbb9bb33b34.tar.gz |
Emoji: Add function to detect if a character is an emoji
Diffstat (limited to 'test')
-rw-r--r-- | test/emoji_test.exs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/emoji_test.exs b/test/emoji_test.exs index 07ac6ff1d..467357291 100644 --- a/test/emoji_test.exs +++ b/test/emoji_test.exs @@ -6,6 +6,14 @@ defmodule Pleroma.EmojiTest do use ExUnit.Case, async: true alias Pleroma.Emoji + describe "is_unicode_emoji?/1" do + test "tells if a string is an unicode emoji" do + refute Emoji.is_unicode_emoji?("X") + assert Emoji.is_unicode_emoji?("☂") + assert Emoji.is_unicode_emoji?("🥺") + end + end + describe "get_all/0" do setup do emoji_list = Emoji.get_all() |