diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-25 17:58:15 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-25 18:08:01 +0300 |
commit | 1c05ff7c06e281fe2abd05ff4969e30ec7268bb1 (patch) | |
tree | b7acaaa4b2689cf3c3b956e0a7efd0342bfcc8bc /test/support | |
parent | 42f76306e7fe69fc51be00285a4fef8569f54989 (diff) | |
download | pleroma-relay-list-change-for-stable.tar.gz |
relay list shows hosts without accepted followrelay-list-change-for-stable
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/http_request_mock.ex | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 833162a61..3c160e8db 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1008,6 +1008,10 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/rin.json")}} 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)}, #{ @@ -1020,6 +1024,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{ |