aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-15 17:28:29 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-15 17:28:29 -0800
commite42b5f99eb04403aa3a850c4f05a609ee6a7846d (patch)
tree849d3320b5ddba99771580ef49edb93434d867f4 /actionpack/test/dispatch
parentcfdd5cbbab68cf34c3fc2248822498191376fe6d (diff)
parent8e221127abf5262183c20e981f7cf1ff4bfe1a4f (diff)
downloadrails-e42b5f99eb04403aa3a850c4f05a609ee6a7846d.tar.gz
rails-e42b5f99eb04403aa3a850c4f05a609ee6a7846d.tar.bz2
rails-e42b5f99eb04403aa3a850c4f05a609ee6a7846d.zip
Merge pull request #8958 from balexand/strong_parameters_exception_handling
Strong parameters exception handling
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/debug_exceptions_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb
index 1319eba9ac..6035f0361e 100644
--- a/actionpack/test/dispatch/debug_exceptions_test.rb
+++ b/actionpack/test/dispatch/debug_exceptions_test.rb
@@ -39,6 +39,8 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
raise ActionController::BadRequest
when "/missing_keys"
raise ActionController::UrlGenerationError, "No route matches"
+ when "/parameter_missing"
+ raise ActionController::ParameterMissing, :missing_param_key
else
raise "puke!"
end
@@ -114,6 +116,10 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest
get "/bad_request", {}, {'action_dispatch.show_exceptions' => true}
assert_response 400
assert_match(/ActionController::BadRequest/, body)
+
+ get "/parameter_missing", {}, {'action_dispatch.show_exceptions' => true}
+ assert_response 400
+ assert_match(/ActionController::ParameterMissing/, body)
end
test "does not show filtered parameters" do