X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fformatter_test.exs;h=cb7695e8e1c2b3576d242dcc77d03e55fcb54b89;hb=61c16193decca80c4021039a674edb77c7bf6158;hp=d96f433f93f4f1880c74abd468a628fb80ab9767;hpb=884006a9e973dff527ec51e08b3d6a99edfdd93d;p=akkoma
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index d96f433f9..cb7695e8e 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -7,10 +7,34 @@ defmodule Pleroma.FormatterTest do
describe ".linkify" do
test "turning urls into links" do
text = "Hey, check out https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&y=2#blabla."
-
expected = "Hey, check out https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&y=2#blabla."
assert Formatter.linkify(text) == expected
+
+ text = "https://mastodon.social/@lambadalambda"
+ expected = "https://mastodon.social/@lambadalambda"
+
+ assert Formatter.linkify(text) == expected
+
+ text = "@lambadalambda"
+ expected = "@lambadalambda"
+
+ assert Formatter.linkify(text) == expected
+
+ text = "http://www.cs.vu.nl/~ast/intel/"
+ expected = "http://www.cs.vu.nl/~ast/intel/"
+
+ assert Formatter.linkify(text) == expected
+
+ text = "https://forum.zdoom.org/viewtopic.php?f=44&t=57087"
+ expected = "https://forum.zdoom.org/viewtopic.php?f=44&t=57087"
+
+ assert Formatter.linkify(text) == expected
+
+ text = "https://en.wikipedia.org/wiki/Sophia_(Gnosticism)#Mythos_of_the_soul"
+ expected = "https://en.wikipedia.org/wiki/Sophia_(Gnosticism)#Mythos_of_the_soul"
+
+ assert Formatter.linkify(text) == expected
end
end