forked from AkkomaGang/akkoma
user_test.exs: fix rel=me tests
This commit is contained in:
parent
211e163770
commit
f3b1266273
1 changed files with 6 additions and 6 deletions
|
@ -1253,18 +1253,18 @@ test "preserves hosts in user links text" do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "Adds rel=me on linkbacked urls" do
|
test "Adds rel=me on linkbacked urls" do
|
||||||
user = insert(:user, ap_id: "http://social.example.org/users/lain")
|
user = insert(:user, ap_id: "https://social.example.org/users/lain")
|
||||||
|
|
||||||
bio = "http://example.org/rel_me/null"
|
bio = "http://example.com/rel_me/null"
|
||||||
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
||||||
assert expected_text == User.parse_bio(bio, user)
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
|
|
||||||
bio = "http://example.org/rel_me/link"
|
bio = "http://example.com/rel_me/link"
|
||||||
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
expected_text = "<a href=\"#{bio}\" rel=\"me\">#{bio}</a>"
|
||||||
assert expected_text == User.parse_bio(bio, user)
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
|
|
||||||
bio = "http://example.org/rel_me/anchor"
|
bio = "http://example.com/rel_me/anchor"
|
||||||
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
expected_text = "<a href=\"#{bio}\" rel=\"me\">#{bio}</a>"
|
||||||
assert expected_text == User.parse_bio(bio, user)
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue