diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-25 16:21:48 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-03-15 16:55:20 +0300 |
commit | 7cf708307644dad42412761c42c75da15dab7cc9 (patch) | |
tree | ca48be13a4bd00defb60d01b6638979ed773da21 /test/support/http_request_mock.ex | |
parent | 963df689b949e14b44a8e3717e8169f5cf195fa7 (diff) | |
download | pleroma-7cf708307644dad42412761c42c75da15dab7cc9.tar.gz pleroma-7cf708307644dad42412761c42c75da15dab7cc9.zip |
relay list shows hosts without accepted follow
Diffstat (limited to 'test/support/http_request_mock.ex')
-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 d46887865..e72638814 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -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{ |