mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 05:04:49 +00:00
c4439c630f
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
21 lines
850 B
Elixir
21 lines
850 B
Elixir
# Pleroma: A lightweight social networking server
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
defmodule Pleroma.Web.Metadata.Providers.RelMeTest do
|
|
use Pleroma.DataCase, async: true
|
|
import Pleroma.Factory
|
|
alias Pleroma.Web.Metadata.Providers.RelMe
|
|
|
|
test "it renders all links with rel='me' from user bio" do
|
|
bio =
|
|
~s(<a href="https://some-link.com">https://some-link.com</a> <a rel="me" href="https://another-link.com">https://another-link.com</a> <link href="http://some.com"> <link rel="me" href="http://some3.com">)
|
|
|
|
user = insert(:user, %{bio: bio})
|
|
|
|
assert RelMe.build_tags(%{user: user}) == [
|
|
{:link, [rel: "me", href: "http://some3.com"], []},
|
|
{:link, [rel: "me", href: "https://another-link.com"], []}
|
|
]
|
|
end
|
|
end
|