Tesla.Mock.text
You're seeing just the function
text
, go back to Tesla.Mock module for more information.
Specs
text(body :: term(), opts :: response_opts()) :: Tesla.Env.t()
Return text response.
Example
import Tesla.Mock
mock fn
%{url: "/ok"} -> text(%{"some" => "data"})
%{url: "/404"} -> text(%{"some" => "data"}, status: 404)
end