Clean up account aliases

This commit is contained in:
Alex Gleason 2020-08-07 16:48:03 -05:00
commit 4af1b80381
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
17 changed files with 47 additions and 222 deletions

View file

@ -33,7 +33,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
user =
insert(:user,
ap_id: "https://hyrule.world/users/zelda",
ap_aliases: ["https://mushroom.kingdom/users/toad"]
also_known_as: ["https://mushroom.kingdom/users/toad"]
)
response =
@ -61,14 +61,20 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
end
test "Webfinger XML" do
user = insert(:user)
user =
insert(:user,
ap_id: "https://hyrule.world/users/zelda",
also_known_as: ["https://mushroom.kingdom/users/toad"]
)
response =
build_conn()
|> put_req_header("accept", "application/xrd+xml")
|> get("/.well-known/webfinger?resource=acct:#{user.nickname}@localhost")
|> response(200)
assert response(response, 200)
assert response =~ "<Alias>https://hyrule.world/users/zelda</Alias>"
assert response =~ "<Alias>https://mushroom.kingdom/users/toad</Alias>"
end
test "it returns 404 when user isn't found (XML)" do