user_test.exs: fix rel=me tests
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 25 Aug 2019 06:48:38 +0000 (08:48 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 25 Aug 2019 06:48:38 +0000 (08:48 +0200)
test/user_test.exs

index 661ffc0b3273af66847f3790f7ff054810fd35b4..2cbc1f5250f15c3856a1cb2e9633b1c5f5890beb 100644 (file)
@@ -1253,18 +1253,18 @@ defmodule Pleroma.UserTest do
     end
 
     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>"
       assert expected_text == User.parse_bio(bio, user)
 
-      bio = "http://example.org/rel_me/link"
-      expected_text = "<a href=\"#{bio}\">#{bio}</a>"
+      bio = "http://example.com/rel_me/link"
+      expected_text = "<a href=\"#{bio}\" rel=\"me\">#{bio}</a>"
       assert expected_text == User.parse_bio(bio, user)
 
-      bio = "http://example.org/rel_me/anchor"
-      expected_text = "<a href=\"#{bio}\">#{bio}</a>"
+      bio = "http://example.com/rel_me/anchor"
+      expected_text = "<a href=\"#{bio}\" rel=\"me\">#{bio}</a>"
       assert expected_text == User.parse_bio(bio, user)
     end
   end