diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-12 18:31:10 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-03-12 18:31:10 +0300 |
commit | 39ed608b13f9204e0503311c7394934b01501ab8 (patch) | |
tree | 34250ed1c719224a3522fd1a841bbd0a360e1245 /test/support/http_request_mock.ex | |
parent | 1306b92997dc6e76e5d617d529dbc229d5aee200 (diff) | |
parent | 00d17520314e3591caaa7ab4ca39c6227a6bdf15 (diff) | |
download | pleroma-39ed608b13f9204e0503311c7394934b01501ab8.tar.gz pleroma-39ed608b13f9204e0503311c7394934b01501ab8.zip |
Merge branch 'develop' into gun
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 f1300637e..8a09e089b 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1287,6 +1287,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)}, #{ @@ -1299,6 +1303,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{ |