Sha256: 34f19791a598d49d8bca4b2ca6ef6b27ed293cd3c9fafeba0ba37361253e72b5
Contents?: true
Size: 654 Bytes
Versions: 11
Compression:
Stored size: 654 Bytes
Contents
require 'core/spec_helper' describe ZendeskAPI::Middleware::Response::Gzip do context "with content-encoding = 'gzip'" do subject { '{ "TESTDATA": true }' } before(:each) do encoded_data = StringIO.new gz = Zlib::GzipWriter.new(encoded_data) gz.write(subject) gz.close stub_request(:get, %r{blergh}).to_return( :headers => { :content_encoding => "gzip", :content_type => "application/json" }, :body => encoded_data.string ) end it "should inflate returned body" do client.connection.get("blergh").body['TESTDATA'].should be_true end end end
Version data entries
11 entries across 11 versions & 1 rubygems