HttpRequestMock: Improve non-implemented error message
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 25 Aug 2019 05:33:46 +0000 (07:33 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Sun, 25 Aug 2019 05:33:46 +0000 (07:33 +0200)
test/support/http_request_mock.ex

index 00f4660c102d96a8b370af8aef3b91cacac00ab2..320244c75219731a8817be478675daa21abed752 100644 (file)
@@ -975,7 +975,7 @@ defmodule HttpRequestMock do
 
   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 @@ defmodule HttpRequestMock 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