summaryrefslogtreecommitdiff
path: root/test/formatter_test.exs
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2018-09-03 14:55:42 +0000
committerkaniini <nenolod@gmail.com>2018-09-03 14:55:42 +0000
commit76c67a41c12a80138e984fa782d7396da53b8d32 (patch)
tree5df0e23a10b29ee0dd31887919b8858253800296 /test/formatter_test.exs
parentd3f6814febb95f03af58543f4896599810f9b069 (diff)
parent1c9e539b47ff594d75c9548a04e64cb0c61cff8c (diff)
downloadpleroma-76c67a41c12a80138e984fa782d7396da53b8d32.tar.gz
pleroma-76c67a41c12a80138e984fa782d7396da53b8d32.zip
Merge branch 'develop' into 'feature/staff-discovery-api'
# Conflicts: # lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
Diffstat (limited to 'test/formatter_test.exs')
-rw-r--r--test/formatter_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index 8453b72ac..273eefb8a 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -214,4 +214,14 @@ defmodule Pleroma.FormatterTest do
assert Formatter.get_emoji(text) == [{"moominmamma", "/finmoji/128px/moominmamma-128.png"}]
end
+
+ test "it returns a nice empty result when no emojis are present" do
+ text = "I love moominamma"
+ assert Formatter.get_emoji(text) == []
+ end
+
+ test "it doesn't die when text is absent" do
+ text = nil
+ assert Formatter.get_emoji(text) == []
+ end
end