Skip to content

Commit

Permalink
Add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguilp committed Jun 19, 2023
1 parent ce94146 commit 0b4e336
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/req/steps_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ defmodule Req.StepsTest do
|> Plug.Conn.send_resp(200, :zlib.gzip("foo"))
end)

assert Req.get!(c.url).body == "foo"
response = Req.get!(c.url)
assert response.body == "foo"
refute List.keymember?(response.headers, "content-encoding", 0)
end

test "decompress_body: brotli", c do
Expand All @@ -265,7 +267,9 @@ defmodule Req.StepsTest do
|> Plug.Conn.send_resp(200, body)
end)

assert Req.get!(c.url).body == "foo"
response = Req.get!(c.url)
assert response.body == "foo"
refute List.keymember?(response.headers, "content-encoding", 0)
end

@tag :capture_log
Expand All @@ -276,7 +280,9 @@ defmodule Req.StepsTest do
|> Plug.Conn.send_resp(200, :ezstd.compress("foo"))
end)

assert Req.get!(c.url).body == "foo"
response = Req.get!(c.url)
assert response.body == "foo"
refute List.keymember?(response.headers, "content-encoding", 0)
end

@tag :tmp_dir
Expand Down

0 comments on commit 0b4e336

Please sign in to comment.