[Pleroma.Web.MastodonAPI.MastodonAPIController]: Bump mastodon_api_level to 2.5.0
[akkoma] / test / formatter_test.exs
index 8453b72ac4b08cd7c3fdbf1c9c247ddcb5ea12c0..273eefb8a773aef4246e86f95b41717fa5d68163 100644 (file)
@@ -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