diff options
Diffstat (limited to 'actionpack/test/dispatch/debug_exceptions_test.rb')
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 6ff651ad52..d236b14e02 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -37,6 +37,8 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest raise ActionView::Template::Error.new('template', AbstractController::ActionNotFound.new) when "/bad_request" raise ActionController::BadRequest + when "/missing_keys" + raise ActionController::UrlGenerationError, "No route matches" else raise "puke!" end @@ -113,6 +115,15 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_match(/AbstractController::ActionNotFound/, body) end + test "named urls missing keys raise 500 level error" do + @app = DevelopmentApp + + get "/missing_keys", {}, {'action_dispatch.show_exceptions' => true} + assert_response 500 + + assert_match(/ActionController::UrlGenerationError/, body) + end + test "show the controller name in the diagnostics template when controller name is present" do @app = DevelopmentApp get("/runtime_error", {}, { |