Update tests, make the mastodon subdomain example not have the /.well-known/host-meta redirect, as the docs don't include it
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
3e2573f1c4
commit
e5be1d04d6
2 changed files with 41 additions and 17 deletions
|
|
@ -1527,14 +1527,6 @@ defmodule HttpRequestMock do
|
|||
}}
|
||||
end
|
||||
|
||||
def get("https://mastodon.example/.well-known/host-meta", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 302,
|
||||
headers: [{"location", "https://sub.mastodon.example/.well-known/host-meta"}]
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://sub.mastodon.example/.well-known/host-meta", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
|
|
@ -1547,11 +1539,15 @@ defmodule HttpRequestMock do
|
|||
end
|
||||
|
||||
def get(
|
||||
"https://sub.mastodon.example/.well-known/webfinger?resource=acct:a@mastodon.example",
|
||||
url,
|
||||
_,
|
||||
_,
|
||||
_
|
||||
) do
|
||||
)
|
||||
when url in [
|
||||
"https://sub.mastodon.example/.well-known/webfinger?resource=acct:a@mastodon.example",
|
||||
"https://sub.mastodon.example/.well-known/webfinger?resource=acct:a@sub.mastodon.example"
|
||||
] do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
|
|
@ -1565,6 +1561,22 @@ defmodule HttpRequestMock do
|
|||
}}
|
||||
end
|
||||
|
||||
def get(
|
||||
"https://mastodon.example/.well-known/webfinger?resource=acct:a@mastodon.example",
|
||||
_,
|
||||
_,
|
||||
_
|
||||
) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 302,
|
||||
headers: [
|
||||
{"location",
|
||||
"https://sub.mastodon.example/.well-known/webfinger?resource=acct:a@mastodon.example"}
|
||||
]
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://sub.mastodon.example/users/a", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
|
|
@ -1610,11 +1622,15 @@ defmodule HttpRequestMock do
|
|||
end
|
||||
|
||||
def get(
|
||||
"https://sub.pleroma.example/.well-known/webfinger?resource=acct:a@pleroma.example",
|
||||
url,
|
||||
_,
|
||||
_,
|
||||
_
|
||||
) do
|
||||
)
|
||||
when url in [
|
||||
"https://sub.pleroma.example/.well-known/webfinger?resource=acct:a@pleroma.example",
|
||||
"https://sub.pleroma.example/.well-known/webfinger?resource=acct:a@sub.pleroma.example"
|
||||
] do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue