Sha256: 924c9fe1c5a34323a4ec4e0f6bbca46c47f096d3ab309904f9957245dacc9f6a
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe "Serving pages from front-end", :type => :integration do dataset :pages_with_layouts before :each do ResponseCache.defaults[:perform_caching] = true ResponseCache.defaults[:directory] = "#{RAILS_ROOT}/tmp/cache" ResponseCache.instance.clear end it "should render a basic page" do navigate_to "/first" end it "should render a deeply nested page" do navigate_to "/parent/child/grandchild/great-grandchild" end it "should respond to conditional GETs based on ETag with 304 when the page is cached" do navigate_to "/first" etag = response.headers['ETag'] get "/first", nil, "If-None-Match" => etag response.headers['ETag'].should == etag response.response_code.should == 304 end it "should respond to conditional GETs based on date with 304 when the page is cached" do navigate_to "/first" date = response.headers['Last-Modified'] get "/first", nil, "If-Modified-Since" => date response.headers['Last-Modified'].should == date response.response_code.should == 304 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
radiant-0.7.2 | spec/integration/page_serving_spec.rb |
radiant-0.7.0 | spec/integration/page_serving_spec.rb |
radiant-0.7.1 | spec/integration/page_serving_spec.rb |