From 7b9868f34344144bfb965cdd099f71b2617976c6 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 2 Mar 2019 06:59:09 +0100 Subject: [PATCH] Pleroma.UserTest: Add tests for rel=me --- test/user_test.exs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/user_test.exs b/test/user_test.exs index cbe4693fc..e182a809f 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -1039,6 +1039,22 @@ test "preserves hosts in user links text" do assert expected_text == User.parse_bio(bio, user) 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 = "#{bio}" + assert expected_text == User.parse_bio(bio, user) + + bio = "http://example.org/rel_me/link" + expected_text = "#{bio}" + assert expected_text == User.parse_bio(bio, user) + + bio = "http://example.org/rel_me/anchor" + expected_text = "#{bio}" + assert expected_text == User.parse_bio(bio, user) + end end test "bookmarks" do