1 require File.dirname(__FILE__) + '/../spec_helper'
3 describe FileNotFoundPage do
4 scenario :file_not_found
8 @page = pages(:file_not_found)
11 it 'should have a working url tag' do
12 assert_renders '/gallery/asdf?param=4', '<r:attempted_url />', '/gallery/asdf?param=4'
15 it 'should correctly quote the url' do
16 assert_renders '/gallery/<script>alert("evil")</script>', '<r:attempted_url />', '/gallery/<script>alert("evil")</script>'
19 it 'should be a virtual page' do
20 @page.should be_virtual
23 it 'should not be cached' do
24 @page.should_not be_cache
27 it 'should have the correct headers' do
28 assert_headers({'Status' => '404 Not Found'}, '/gallery/asdf')