diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-25 16:21:48 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-02 09:27:20 +0300 |
commit | cc98d010edc444e260c81ac9f264a27d9afd5daf (patch) | |
tree | ca00b4f0d6b979e104a1b8010e50313179fb5bcb /test/support/http_request_mock.ex | |
parent | 6ceef768cba23ab79a5545330746c7d8ce97ed64 (diff) | |
download | pleroma-cc98d010edc444e260c81ac9f264a27d9afd5daf.tar.gz pleroma-cc98d010edc444e260c81ac9f264a27d9afd5daf.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{ |