1 require File.dirname(__FILE__) + '/../test_helper'
3 class FileNotFoundPageTest < Test::Unit::TestCase
5 test_helper :pages, :render
8 @page = pages(:file_not_found)
12 assert_renders '/gallery/asdf?param=4', '<r:attempted_url />', '/gallery/asdf?param=4'
15 def test_url__malicious_url
16 assert_renders '/gallery/<script>alert("evil")</script>', '<r:attempted_url />', '/gallery/<script>alert("evil")</script>'
20 assert_equal true, @page.virtual?
24 assert_equal false, @page.cache?
28 assert_headers({'Status' => '404 Not Found'}, '/gallery/asdf')