Pleroma.UserTest: Add tests for rel=me
This commit is contained in:
parent
8e6f7fdb86
commit
7b9868f343
1 changed files with 16 additions and 0 deletions
|
@ -1039,6 +1039,22 @@ defmodule Pleroma.UserTest do
|
||||||
|
|
||||||
assert expected_text == User.parse_bio(bio, user)
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "Adds rel=me on linkbacked urls" do
|
||||||
|
user = insert(:user, ap_id: "http://social.example.org/users/lain")
|
||||||
|
|
||||||
|
bio = "http://example.org/rel_me/null"
|
||||||
|
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
||||||
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
|
|
||||||
|
bio = "http://example.org/rel_me/link"
|
||||||
|
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
||||||
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
|
|
||||||
|
bio = "http://example.org/rel_me/anchor"
|
||||||
|
expected_text = "<a href=\"#{bio}\">#{bio}</a>"
|
||||||
|
assert expected_text == User.parse_bio(bio, user)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
test "bookmarks" do
|
test "bookmarks" do
|
||||||
|
|
Loading…
Reference in a new issue