From 564d3df144974f8527f1e00279a0446d3f9562b1 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Tue, 5 Nov 2024 19:41:01 -0500 Subject: [PATCH] fix: typespec for test module (#726) --- lib/tesla/test.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tesla/test.ex b/lib/tesla/test.ex index dec4862f..e23463e5 100644 --- a/lib/tesla/test.ex +++ b/lib/tesla/test.ex @@ -66,7 +66,7 @@ defmodule Tesla.Test do ... } """ - @spec html(Tesla.Env.t(), binary) :: Tesla.Env.t() + @spec html(%Tesla.Env{}, binary) :: %Tesla.Env{} def html(%Tesla.Env{} = env, body) when is_binary(body) do env |> Tesla.put_body(body) @@ -86,7 +86,7 @@ defmodule Tesla.Test do If the body is binary, it will be returned as is and it will not try to encode it to JSON. """ - @spec json(Tesla.Env.t(), term) :: Tesla.Env.t() + @spec json(%Tesla.Env{}, term) :: %Tesla.Env{} def json(%Tesla.Env{} = env, body) do body = encode!(body, "application/json") @@ -105,7 +105,7 @@ defmodule Tesla.Test do ... } """ - @spec text(Tesla.Env.t(), binary) :: Tesla.Env.t() + @spec text(%Tesla.Env{}, binary) :: %Tesla.Env{} def text(%Tesla.Env{} = env, body) when is_binary(body) do env |> Tesla.put_body(body)