From e22737ffb5f7e7c567802e2bcef5520e2759e734 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 25 Aug 2019 07:33:46 +0200 Subject: [PATCH] HttpRequestMock: Improve non-implemented error message --- test/support/http_request_mock.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 00f4660c1..320244c75 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -975,7 +975,7 @@ def get("https://mstdn.jp/.well-known/webfinger?resource=acct:kpherox@mstdn.jp", def get(url, query, body, headers) do {:error, - "Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{ + "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{ inspect(headers) }"} end @@ -1037,7 +1037,10 @@ def post("http://404.site" <> _, _, _, _) do }} end - def post(url, _query, _body, _headers) do - {:error, "Not implemented the mock response for post #{inspect(url)}"} + def post(url, query, body, headers) do + {:error, + "Mock response not implemented for POST #{inspect(url)}, #{query}, #{inspect(body)}, #{ + inspect(headers) + }"} end end