} ->
json(%{"my" => "data"})
+ %{method: :head, url: "http://example.com/hello"} ->
+ %Tesla.Env{status: 200, body: ""}
+
%{method: :get, url: "http://example.com/hello"} ->
%Tesla.Env{status: 200, body: "hello"}
:ok
end
+ describe "head/1" do
+ test "returns successfully result" do
+ assert HTTP.head("http://example.com/hello") == {:ok, %Tesla.Env{status: 200, body: ""}}
+ end
+ end
+
describe "get/1" do
test "returns successfully result" do
assert HTTP.get("http://example.com/hello") == {