aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/show_exceptions_test.rb
diff options
context:
space:
mode:
authorJosh Goebel <dreamer3@gmail.com>2013-03-21 14:23:46 -0400
committerJosh Goebel <dreamer3@gmail.com>2013-03-21 14:23:46 -0400
commitea2336b9e2c47a9cc1a73b1350ffc03252e6468e (patch)
tree8bfd4a55d6710ede53fb0be5e56d2a780eaf354f /actionpack/test/dispatch/show_exceptions_test.rb
parentecfdc842a58816540e7c96a913f95a0d94be7ca7 (diff)
downloadrails-ea2336b9e2c47a9cc1a73b1350ffc03252e6468e.tar.gz
rails-ea2336b9e2c47a9cc1a73b1350ffc03252e6468e.tar.bz2
rails-ea2336b9e2c47a9cc1a73b1350ffc03252e6468e.zip
failure to parse params should trigger a 400 Bad Request
Diffstat (limited to 'actionpack/test/dispatch/show_exceptions_test.rb')
-rw-r--r--actionpack/test/dispatch/show_exceptions_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb
index 45f8fc11b3..900f45ee5e 100644
--- a/actionpack/test/dispatch/show_exceptions_test.rb
+++ b/actionpack/test/dispatch/show_exceptions_test.rb
@@ -8,6 +8,8 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
case req.path
when "/not_found"
raise AbstractController::ActionNotFound
+ when "/bad_params"
+ raise ActionDispatch::ParamsParser::ParseError.new("", StandardError.new)
when "/method_not_allowed"
raise ActionController::MethodNotAllowed
when "/not_found_original_exception"
@@ -33,6 +35,10 @@ class ShowExceptionsTest < ActionDispatch::IntegrationTest
get "/", {}, {'action_dispatch.show_exceptions' => true}
assert_response 500
assert_equal "500 error fixture\n", body
+
+ get "/bad_params", {}, {'action_dispatch.show_exceptions' => true}
+ assert_response 400
+ assert_equal "400 error fixture\n", body
get "/not_found", {}, {'action_dispatch.show_exceptions' => true}
assert_response 404