X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fsupport%2Fhttp_request_mock.ex;h=79ab129fdc52940584ba06f81fa262eca92371e5;hb=c9f51edea12599cd0384b0f23d5aba8465c6a865;hp=0079d8c4498018ca13986e2a1a1fa03f748b55cb;hpb=863ec33ba2a90708d199f18683ffe0c4658c710a;p=akkoma diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 0079d8c44..79ab129fd 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -1292,6 +1292,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)}, #{ @@ -1304,6 +1308,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{