Sha256: 7d3249d2006ffd5a68dbe3f3f6fd148276a7002cc93221407898a94137d03b08

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 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 have the correct headers' do
    assert_headers({'Status' => '404 Not Found'}, '/gallery/asdf')
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-0.7.2 spec/models/file_not_found_page_spec.rb
radiant-0.7.0 spec/models/file_not_found_page_spec.rb
radiant-0.7.1 spec/models/file_not_found_page_spec.rb