Test that the target account is re-fetched in move_account
Ref: emit-move
This commit is contained in:
parent
eb383ef8d3
commit
3fd13b70ec
5 changed files with 127 additions and 0 deletions
|
|
@ -1133,6 +1133,57 @@ defmodule HttpRequestMock do
|
|||
}}
|
||||
end
|
||||
|
||||
def get("http://lm.kazv.moe/.well-known/host-meta", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body: File.read!("test/fixtures/tesla_mock/lm.kazv.moe_host_meta")
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://lm.kazv.moe/.well-known/host-meta", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body: File.read!("test/fixtures/tesla_mock/lm.kazv.moe_host_meta")
|
||||
}}
|
||||
end
|
||||
|
||||
def get(
|
||||
"https://lm.kazv.moe/.well-known/webfinger?resource=acct:mewmew@lm.kazv.moe",
|
||||
_,
|
||||
_,
|
||||
[{"accept", "application/xrd+xml,application/jrd+json"}]
|
||||
) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body: File.read!("test/fixtures/tesla_mock/https___lm.kazv.moe_users_mewmew.xml"),
|
||||
headers: [{"content-type", "application/xrd+xml"}]
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://lm.kazv.moe/users/mewmew", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body: File.read!("test/fixtures/tesla_mock/mewmew@lm.kazv.moe.json"),
|
||||
headers: activitypub_object_headers()
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://lm.kazv.moe/users/mewmew/collections/featured", _, _, _) do
|
||||
{:ok,
|
||||
%Tesla.Env{
|
||||
status: 200,
|
||||
body:
|
||||
File.read!("test/fixtures/users_mock/masto_featured.json")
|
||||
|> String.replace("{{domain}}", "lm.kazv.moe")
|
||||
|> String.replace("{{nickname}}", "mewmew"),
|
||||
headers: [{"content-type", "application/activity+json"}]
|
||||
}}
|
||||
end
|
||||
|
||||
def get("https://info.pleroma.site/activity.json", _, _, [
|
||||
{"accept", "application/activity+json"}
|
||||
]) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue