diff options
author | Matthew Draper <matthew@trebex.net> | 2016-07-14 00:58:30 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 00:58:30 +0930 |
commit | 3b55ac22c920c366080fe3b56c9c3a3728f69f57 (patch) | |
tree | 5819c9fba244725ba05c22fc0acf7c4f5ac54b02 /actionpack/test | |
parent | 3e18af6916a4f430eb0b5eb3c9d509ab43864478 (diff) | |
parent | fe859a54219740fa8b4e09a592820d2ee12ba222 (diff) | |
download | rails-3b55ac22c920c366080fe3b56c9c3a3728f69f57.tar.gz rails-3b55ac22c920c366080fe3b56c9c3a3728f69f57.tar.bz2 rails-3b55ac22c920c366080fe3b56c9c3a3728f69f57.zip |
Merge pull request #25799 from greysteil/wrap-rack-params-exceptions
Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/exception_wrapper_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/exception_wrapper_test.rb b/actionpack/test/dispatch/exception_wrapper_test.rb index dfbb91c0ca..0959cf2805 100644 --- a/actionpack/test/dispatch/exception_wrapper_test.rb +++ b/actionpack/test/dispatch/exception_wrapper_test.rb @@ -57,6 +57,12 @@ module ActionDispatch assert_equal [ "lib/file.rb:42:in `index'" ], wrapper.application_trace end + test '#status_code returns 400 for Rack::Utils::ParameterTypeError' do + exception = Rack::Utils::ParameterTypeError.new + wrapper = ExceptionWrapper.new(@cleaner, exception) + assert_equal 400, wrapper.status_code + end + test '#application_trace cannot be nil' do nil_backtrace_wrapper = ExceptionWrapper.new(@cleaner, BadlyDefinedError.new) nil_cleaner_wrapper = ExceptionWrapper.new(nil, BadlyDefinedError.new) |