Skip to content

Commit

Permalink
fix: typespec for test module (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
yordis authored Nov 6, 2024
1 parent 1fca7c3 commit 564d3df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tesla/test.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")

Expand All @@ -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)
Expand Down

0 comments on commit 564d3df

Please sign in to comment.