Merge remote-tracking branch 'remotes/origin/develop' into 1560-non-federating-instances-routes-restrictions

# Conflicts:
#	test/web/activity_pub/activity_pub_controller_test.exs
This commit is contained in:
Ivan Tashkinov 2020-03-12 12:07:07 +03:00
commit bd40880fa0
31 changed files with 451 additions and 85 deletions

View file

@ -1277,6 +1277,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)}, #{
@ -1289,6 +1293,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{