fetch url for OStatus to know if it is a/c or status

This commit is contained in:
Sachin Joshi 2019-04-02 10:26:09 +05:45
commit 6386c1c9c1
6 changed files with 377 additions and 108 deletions

View file

@ -52,6 +52,27 @@ defmodule HttpRequestMock do
}}
end
def get(
"https://mastodon.social/.well-known/webfinger?resource=https://mastodon.social/users/emelie",
_,
_,
_
) do
{:ok,
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/httpoison_mock/webfinger_emelie.json")
}}
end
def get("https://mastodon.social/users/emelie.atom", _, _, _) do
{:ok,
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/httpoison_mock/emelie.atom")
}}
end
def get(
"https://osada.macgirvin.com/.well-known/webfinger?resource=acct:mike@osada.macgirvin.com",
_,