Explorar el Código

Formatter: Test link with local mention

chores/our-libs-hex-releases
Alex Gleason hace 4 años
padre
commit
880301985b
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 7211D1F99744FBB7
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. +10
    -0
      test/formatter_test.exs

+ 10
- 0
test/formatter_test.exs Ver fichero

@@ -255,6 +255,16 @@ defmodule Pleroma.FormatterTest do

assert {_text, ^expected_mentions, []} = Formatter.linkify(text)
end

test "it parses URL containing local mention" do
_user = insert(:user, %{nickname: "lain"})

text = "https://example.com/@lain"

expected = ~S(<a href="https://example.com/@lain" rel="ugc">https://example.com/@lain</a>)

assert {^expected, [], []} = Formatter.linkify(text)
end
end

describe ".parse_tags" do


Cargando…
Cancelar
Guardar