diff options
author | rinpatch <rinpatch@sdf.org> | 2020-03-15 21:54:24 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-03-15 21:54:24 +0000 |
commit | bb49d8f5a0dbbad65a8f65a28cc2d0847b518067 (patch) | |
tree | 938fb7fd74053a816c21948b28d5f6cfb7443f37 /test/support/http_request_mock.ex | |
parent | e8493431bfc16977e43715bf8bdb09ac46580028 (diff) | |
parent | 8d15d6c3ab9aecb82ba5126bb5efef20b3dfef41 (diff) | |
download | pleroma-2.0.1.tar.gz |
Merge branch 'release/2.0.1' into 'stable'v2.0.1
2.0.1 release
See merge request pleroma/pleroma!2298
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{ |