Sha256: fb3a5b08dfb4e3e5c85aa34567425cb036cdca12cd7b41ccd82fa5802a977cb3

Contents?: true

Size: 461 Bytes

Versions: 12

Compression:

Stored size: 461 Bytes

Contents

require 'spec_helper'

describe ZendeskAPI::Middleware::Response::Deflate do
  context "with content-encoding = 'deflate'" do
    subject { '{ "TESTDATA": true }' }

    before(:each) do
      stub_request(:get, %r{blergh}).to_return(:headers => { :content_encoding => "deflate" }, :body => Zlib::Deflate.deflate(subject))
    end

    it "should inflate returned body" do
      client.connection.get("blergh").body['TESTDATA'].should be_true
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
zendesk_api-0.1.11 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.10 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.9 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.8 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.7 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.6 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.5 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.4 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.3 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.2 spec/middleware/response/deflate_spec.rb
zendesk_api-0.1.1 spec/middleware/response/deflate_spec.rb
zendesk_api-0.0.9 spec/middleware/response/deflate_spec.rb