test "test use_casette with HTTPotion and gzip compression" do
use_cassette "api_stackexchange_com" do
HTTPotion.start
response = :zlib.gunzip(HTTPotion.get("https://api.stackexchange.com/2.2").body)
assert response =~ "bad_parameter"
end
end
with the following error
1) test test use_casette with HTTPotion and gzip compression (DevQuotes.DataSourceControllerTest)
test/controllers/data_source_controller_test.exs:36
** (ErlangError) erlang error: :data_error
stacktrace:
:zlib.call/3
:zlib.inflate/2
:zlib.gunzip/1
lib/exvcr/json.ex:24: ExVCR.JSON.gunzip_recording/1
(elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
lib/exvcr/json.ex:11: ExVCR.JSON.save/2
test/controllers/data_source_controller_test.exs:37: (test)
The following test fails
with the following error
Any idea on how to fix this?