瀏覽代碼

Formatter: Test link with local mention

chores/our-libs-hex-releases
Alex Gleason 4 年之前
父節點
當前提交
880301985b
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 7211D1F99744FBB7
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      test/formatter_test.exs

+ 10
- 0
test/formatter_test.exs 查看文件

@@ -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


Loading…
取消
儲存