Add account aliases
This commit is contained in:
parent
3a2b2cb6f2
commit
d0eb43b58b
13 changed files with 220 additions and 4 deletions
|
|
@ -30,14 +30,24 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
|
|||
end
|
||||
|
||||
test "Webfinger JRD" do
|
||||
user = insert(:user)
|
||||
user =
|
||||
insert(:user,
|
||||
ap_id: "https://hyrule.world/users/zelda",
|
||||
ap_aliases: ["https://mushroom.kingdom/users/toad"]
|
||||
)
|
||||
|
||||
response =
|
||||
build_conn()
|
||||
|> put_req_header("accept", "application/jrd+json")
|
||||
|> get("/.well-known/webfinger?resource=acct:#{user.nickname}@localhost")
|
||||
|> json_response(200)
|
||||
|
||||
assert json_response(response, 200)["subject"] == "acct:#{user.nickname}@localhost"
|
||||
assert response["subject"] == "acct:#{user.nickname}@localhost"
|
||||
|
||||
assert response["aliases"] == [
|
||||
"https://hyrule.world/users/zelda",
|
||||
"https://mushroom.kingdom/users/toad"
|
||||
]
|
||||
end
|
||||
|
||||
test "it returns 404 when user isn't found (JSON)" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue