Sha256: db0b72c0d9bb2b32d7c1fea7e321faed17491a09bb0d1214824ed03bc7afb727

Contents?: true

Size: 767 Bytes

Versions: 16

Compression:

Stored size: 767 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe FileNotFoundPage do
  dataset :file_not_found
  test_helper :render
  
  before(:each) do
    @page = pages(:file_not_found)
  end
  
  it 'should have a working url tag' do
    assert_renders '/gallery/asdf?param=4', '<r:attempted_url />', '/gallery/asdf?param=4'
  end

  it 'should correctly quote the url' do
    assert_renders '/gallery/&lt;script&gt;alert(&quot;evil&quot;)&lt;/script&gt;', '<r:attempted_url />', '/gallery/<script>alert("evil")</script>'
  end
  
  it 'should be a virtual page' do
    @page.should be_virtual
  end
  
  it 'should not be cached' do
    @page.should_not be_cache
  end
  
  it 'should return a 404 status code' do
    @page.response_code.should == 404
  end
  
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.2.2 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.2.1 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.2 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.9 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.8 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.7 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.6 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.5 spec/models/file_not_found_page_spec.rb
radiantcms-couchrest_model-0.1.4 spec/models/file_not_found_page_spec.rb
radiant-0.9.1 spec/models/file_not_found_page_spec.rb
radiant-0.8.2 spec/models/file_not_found_page_spec.rb
radiant-0.9.0.rc2 spec/models/file_not_found_page_spec.rb
radiant-rc-0.9.0 spec/models/file_not_found_page_spec.rb
radiant-0.8.1 spec/models/file_not_found_page_spec.rb
radiant-0.8.0 spec/models/file_not_found_page_spec.rb