Merge branch 'develop' into gun

This commit is contained in:
Alexander Strizhakov 2020-03-12 18:31:10 +03:00
commit 39ed608b13
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
34 changed files with 457 additions and 90 deletions

View file

@ -1287,6 +1287,10 @@ defmodule HttpRequestMock do
{:ok, %Tesla.Env{status: 404, body: ""}}
end
def get("https://relay.mastodon.host/actor", _, _, _) do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/relay/relay.json")}}
end
def get(url, query, body, headers) do
{:error,
"Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{
@ -1299,6 +1303,10 @@ defmodule HttpRequestMock do
def post(url, query \\ [], body \\ [], headers \\ [])
def post("https://relay.mastodon.host/inbox", _, _, _) do
{:ok, %Tesla.Env{status: 200, body: ""}}
end
def post("http://example.org/needs_refresh", _, _, _) do
{:ok,
%Tesla.Env{