[Pleroma.FormatterTest] Add test for XMPP link

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-06-23 13:32:03 +02:00
parent 1a2255ef7e
commit 32a55e9695
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -85,6 +85,12 @@ test "turning urls into links" do
"<a href=\"https://pleroma.com\">https://pleroma.com</a> <a href=\"https://pleroma.com/sucks\">https://pleroma.com/sucks</a>" "<a href=\"https://pleroma.com\">https://pleroma.com</a> <a href=\"https://pleroma.com/sucks\">https://pleroma.com/sucks</a>"
assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
text = "xmpp:contact@hacktivis.me"
expected = "<a href=\"xmpp:contact@hacktivis.me\">xmpp:contact@hacktivis.me</a>"
assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
end end
end end