[Pleroma.FormatterTest]: .add_links: Add a space before the dot
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sat, 23 Jun 2018 11:28:14 +0000 (13:28 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 30 Jul 2018 20:01:48 +0000 (22:01 +0200)
A dot is legal in the url, even at the end, so I moved it for the test

test/formatter_test.exs

index c2b3d4ac055a06c965334b19390b9db465479f2b..acf0adb1c39c53a1ad445c8e2b1726f438cafe48 100644 (file)
@@ -20,10 +20,10 @@ defmodule Pleroma.FormatterTest do
 
   describe ".add_links" 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."
+      text = "Hey, check out https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&y=2#blabla ."
 
       expected =
-        "Hey, check out <a href=\"https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&amp;y=2#blabla\">https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&amp;y=2#blabla</a>."
+        "Hey, check out <a href=\"https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&amp;y=2#blabla\">https://www.youtube.com/watch?v=8Zg1-TufF%20zY?x=1&amp;y=2#blabla</a> ."
 
       assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected