Sha256: dea893d976ded67fc9c720e5bf305b9edb6a79b5229d4efcc920ef2f185aae07
Contents?: true
Size: 622 Bytes
Versions: 3
Compression:
Stored size: 622 Bytes
Contents
require 'core/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} headers = response.headers 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} response.headers.should == headers end end
Version data entries
3 entries across 3 versions & 1 rubygems