Sha256: db6cea8466e1a005365d540476d1db5b489533cbe0753d123fd868acda0ef2a5
Contents?: true
Size: 546 Bytes
Versions: 12
Compression:
Stored size: 546 Bytes
Contents
require 'spec_helper' describe ZendeskAPI::Middleware::Request::EtagCache do it "caches" do client.config.cache.size = 1 stub_json_request(:get, %r{blergh}, '{"x":1}', :headers => {"Etag" => "x"}) response = client.connection.get("blergh") response.status.should == 200 response.body.should == {"x"=>1} stub_request(:get, %r{blergh}).to_return(:status => 304, :headers => {"Etag" => "x"}) response = client.connection.get("blergh") response.status.should == 304 response.body.should == {"x"=>1} end end
Version data entries
12 entries across 12 versions & 1 rubygems