[Pleroma.FormatterTest] Add test for XMPP link
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 23 Jun 2018 11:32:03 +0000 (13:32 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 30 Jul 2018 20:01:48 +0000 (22:01 +0200)
test/formatter_test.exs

index acf0adb1c39c53a1ad445c8e2b1726f438cafe48..abbd7ac93cc0d02afb2a6a4551dec5f8bda270f9 100644 (file)
@@ -85,6 +85,12 @@ defmodule Pleroma.FormatterTest do
         "<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
+
+      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