describe ".parse_tags" do
test "parses tags in the text" do
- text = "Here's a #test. Maybe these are #working or not. What about #漢字? And #は。"
+ text = "Here's a #Test. Maybe these are #working or not. What about #漢字? And #は。"
expected = [
- {"#test", "test"},
+ {"#Test", "test"},
{"#working", "working"},
{"#漢字", "漢字"},
{"#は", "は"}
assert Formatter.parse_mentions(text) == expected_result
end
+
+ test "it adds cool emoji" do
+ text = "I love :moominmamma:"
+
+ expected_result = "I love <img height='32px' width='32px' alt='moominmamma' title='moominmamma' src='#{Pleroma.Web.Endpoint.static_url}/finmoji/128px/moominmamma-128.png' />"
+
+ assert Formatter.finmojifiy(text) == expected_result
+ end
end