Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21907989
rel_me_test.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
683 B
Referenced Files
None
Subscribers
None
rel_me_test.exs
View Options
defmodule
Pleroma.Web.Metadata.Providers.RelMeTest
do
use
Pleroma.DataCase
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
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sun, Dec 28, 1:42 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
840693
Default Alt Text
rel_me_test.exs (683 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment