Skip to content

Commit

Permalink
Fix incorrect put_header doctest (& re-enable the doctest) (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar authored Nov 29, 2023
1 parent 3f35d2c commit 05a6038
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/req/response.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ defmodule Req.Response do
## Examples
iex> resp = Req.Response.put_header(resp, "content-type", "application/json")
iex> resp = Req.Response.put_header(%Req.Response{}, "content-type", "application/json")
iex> resp.headers
[{"content-type", "application/json"}]
%{"content-type" => ["application/json"]}
"""
@spec put_header(t(), binary(), binary()) :: t()
if Req.MixProject.legacy_headers_as_lists?() do
Expand Down
2 changes: 1 addition & 1 deletion test/req/response_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Req.ResponseTest do
use ExUnit.Case, async: true
doctest Req.Response, except: [get_header: 2, put_header: 3, delete_header: 2]
doctest Req.Response, except: [get_header: 2, delete_header: 2]
end

0 comments on commit 05a6038

Please sign in to comment.