1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-23 16:15:03 +01:00

[Pleroma.FormatterTest]: .add_links: Add a space before the dot

A dot is legal in the url, even at the end, so I moved it for the test
This commit is contained in:
Haelwenn (lanodan) Monnier 2018-06-23 13:28:14 +02:00
parent 3623504e5d
commit 1a2255ef7e
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE

View File

@ -20,10 +20,10 @@ defmodule Pleroma.FormatterTest do
describe ".add_links" do describe ".add_links" do
test "turning urls into 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 = 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 assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected