Sha256: e774b5132a23fa851ce3089718fe75c05778df12b703f96915e3b3b8249ccb76

Contents?: true

Size: 709 Bytes

Versions: 97

Compression:

Stored size: 709 Bytes

Contents

require "#{File.dirname(__FILE__)}/spec_setup"
require 'rack/cache/request'

describe 'Rack::Cache::Request' do
  it 'is marked as no_cache when the Cache-Control header includes the no-cache directive' do
    request = Rack::Cache::Request.new('HTTP_CACHE_CONTROL' => 'public, no-cache')
    request.should.be.no_cache
  end

  it 'is marked as no_cache when request should not be loaded from cache' do
    request = Rack::Cache::Request.new('HTTP_PRAGMA' => 'no-cache')
    request.should.be.no_cache
  end

  it 'is not marked as no_cache when neither no-cache directive is specified' do
    request = Rack::Cache::Request.new('HTTP_CACHE_CONTROL' => 'public')
    request.should.not.be.no_cache
  end
end

Version data entries

97 entries across 73 versions & 19 rubygems

Version Path
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/test/request_test.rb
swipe-rails-0.0.5 vendor/bundle/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rack-cache-1.2/test/request_test.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/rack-cache-1.2/test/request_test.rb
challah-1.0.0.beta3 vendor/bundle/gems/rack-cache-1.2/test/request_test.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
challah-1.0.0.beta2 vendor/bundle/gems/rack-cache-1.2/test/request_test.rb
challah-1.0.0.beta vendor/bundle/gems/rack-cache-1.2/test/request_test.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb
active_mailer-0.0.4 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/test/request_test.rb