From 0b4e336e337d89204233746b52bca15b6bab1871 Mon Sep 17 00:00:00 2001 From: Tangui Le Pense <29804907+tanguilp@users.noreply.github.com> Date: Mon, 19 Jun 2023 18:10:35 +0200 Subject: [PATCH] Add failing tests --- test/req/steps_test.exs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/req/steps_test.exs b/test/req/steps_test.exs index 50fe4a4c..1e112e74 100644 --- a/test/req/steps_test.exs +++ b/test/req/steps_test.exs @@ -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 @@ -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 @@ -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