Permalink
Browse files

[core] Adds 403 custom test

  • Loading branch information...
nesquena committed Mar 11, 2013
1 parent 15927ec commit 181b844ab93914c88bfd908a5eefe8b67d2aaeef
Showing with 11 additions and 0 deletions.
  1. +11 −0 padrino-core/test/test_routing.rb
@@ -1719,6 +1719,17 @@ def authorize(username, password)
assert_equal "custom 404 not found".length.to_s, headers['Content-Length']
end
should 'render a custom 403 page' do
mock_app do
error(403) { "custom 403 not found" }
get("/") { status 403 }
end
get "/"
assert_equal 403, status
assert_equal "custom 403 not found", body
assert_equal "custom 403 not found".length.to_s, headers['Content-Length']
end
should 'recognize paths' do
mock_app do
controller :foo do

0 comments on commit 181b844

Please sign in to comment.