aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSzymon Nowak <szimek@gmail.com>2012-08-24 18:08:06 +0200
committerSzymon Nowak <szimek@gmail.com>2012-08-24 18:08:06 +0200
commitd14e2e5a217c5dfbc0de1796f2821ea1efd07fe4 (patch)
treee1c4950a94729ca43b615f56e3c30efde7b4af3d /actionpack/test
parent6a70f2dd6b791c3f4888122d5b7dd9c8f5cac871 (diff)
downloadrails-d14e2e5a217c5dfbc0de1796f2821ea1efd07fe4.tar.gz
rails-d14e2e5a217c5dfbc0de1796f2821ea1efd07fe4.tar.bz2
rails-d14e2e5a217c5dfbc0de1796f2821ea1efd07fe4.zip
Raise generic ParseError exception when ActionDispatch::ParamsParser fails parsing request params.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/request/json_params_parsing_test.rb2
-rw-r--r--actionpack/test/dispatch/request/xml_params_parsing_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/request/json_params_parsing_test.rb b/actionpack/test/dispatch/request/json_params_parsing_test.rb
index 302bff0696..f7f621df71 100644
--- a/actionpack/test/dispatch/request/json_params_parsing_test.rb
+++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb
@@ -46,7 +46,7 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest
begin
$stderr = StringIO.new # suppress the log
json = "[\"person]\": {\"name\": \"David\"}}"
- assert_raise(MultiJson::DecodeError) { post "/parse", json, {'CONTENT_TYPE' => 'application/json', 'action_dispatch.show_exceptions' => false} }
+ assert_raise(ActionDispatch::ParamsParser::ParseError) { post "/parse", json, {'CONTENT_TYPE' => 'application/json', 'action_dispatch.show_exceptions' => false} }
ensure
$stderr = STDERR
end
diff --git a/actionpack/test/dispatch/request/xml_params_parsing_test.rb b/actionpack/test/dispatch/request/xml_params_parsing_test.rb
index 84823e2896..0fcae1e650 100644
--- a/actionpack/test/dispatch/request/xml_params_parsing_test.rb
+++ b/actionpack/test/dispatch/request/xml_params_parsing_test.rb
@@ -68,7 +68,7 @@ class XmlParamsParsingTest < ActionDispatch::IntegrationTest
begin
$stderr = StringIO.new # suppress the log
xml = "<person><name>David</name></pineapple>"
- assert_raise(REXML::ParseException) { post "/parse", xml, default_headers.merge('action_dispatch.show_exceptions' => false) }
+ assert_raise(ActionDispatch::ParamsParser::ParseError) { post "/parse", xml, default_headers.merge('action_dispatch.show_exceptions' => false) }
ensure
$stderr = STDERR
end