logo

auto_linker

AutoLinker-shim, based on https://git.pleroma.social/pleroma/auto_linker git clone https://hacktivis.me/git/auto_linker.git
commit: 204ad610e3a14414d3b4543f6b4693f961213981
parent a4184277d00085d5cfc52fc79f2c4c7adf6ef6fe
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 27 Feb 2019 18:22:52 +0100

AutoLinker.BuilderTest: Match (strange) behaviour

Diffstat:

Mtest/builder_test.exs8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/builder_test.exs b/test/builder_test.exs @@ -6,14 +6,16 @@ defmodule AutoLinker.BuilderTest do test "create_link/2" do expected = - "<a href=\"text\" class=\"auto-linker\" target=\"_blank\" rel=\"noopener noreferrer\">text</a>" + "<a href=\"http://text\" class=\"auto-linker\" target=\"_blank\" rel=\"noopener noreferrer\">text</a>" assert create_link("text", %{href: "url"}) == expected - expected = "<a href=\"text\" class=\"auto-linker\" target=\"_blank\">text</a>" + expected = "<a href=\"http://text\" class=\"auto-linker\" target=\"_blank\">text</a>" assert create_link("text", %{href: "url", rel: nil}) == expected - expected = "<a href=\"text\" class=\"auto-linker\" target=\"_blank\" rel=\"me\">text</a>" + expected = + "<a href=\"http://text\" class=\"auto-linker\" target=\"_blank\" rel=\"me\">text</a>" + assert create_link("text", %{href: "url", rel: "me"}) == expected end