Update pleroma.nginx
[akkoma] / test / formatter_test.exs
index 2cf1f3f8e7cf2685bd9585be4637034b41c17d9a..c2b3d4ac055a06c965334b19390b9db465479f2b 100644 (file)
@@ -78,6 +78,13 @@ defmodule Pleroma.FormatterTest do
         "<a href=\"https://en.wikipedia.org/wiki/Duff&#39;s_device\">https://en.wikipedia.org/wiki/Duff&#39;s_device</a>"
 
       assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+
+      text = "https://pleroma.com https://pleroma.com/sucks"
+
+      expected =
+        "<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
     end
   end
 
@@ -102,9 +109,9 @@ defmodule Pleroma.FormatterTest do
       Enum.each(subs, fn {uuid, _} -> assert String.contains?(text, uuid) end)
 
       expected_text =
-        "<span><a href='#{gsimg.ap_id}'>@<span>gsimg</span></a></span> According to <span><a href='#{
+        "<span><a class='mention' href='#{gsimg.ap_id}'>@<span>gsimg</span></a></span> According to <span><a class='mention' href='#{
           "https://archeme/@archaeme"
-        }'>@<span>archaeme</span></a></span>, that is @daggsy. Also hello <span><a href='#{
+        }'>@<span>archaeme</span></a></span>, that is @daggsy. Also hello <span><a class='mention' href='#{
           archaeme_remote.ap_id
         }'>@<span>archaeme</span></a></span>"