diff options
Diffstat (limited to 'actionpack/test/dispatch/request')
-rw-r--r-- | actionpack/test/dispatch/request/json_params_parsing_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/dispatch/request/multipart_params_parsing_test.rb | 2 |
2 files changed, 4 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 d0cd32a242..10234a4815 100644 --- a/actionpack/test/dispatch/request/json_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/json_params_parsing_test.rb @@ -75,7 +75,9 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest begin $stderr = StringIO.new # suppress the log json = "[\"person]\": {\"name\": \"David\"}}" - exception = assert_raise(ActionDispatch::ParamsParser::ParseError) { post "/parse", json, "CONTENT_TYPE" => "application/json", "action_dispatch.show_exceptions" => false } + exception = assert_raise(ActionDispatch::Http::Parameters::ParseError) do + post "/parse", params: json, headers: { "CONTENT_TYPE" => "application/json", "action_dispatch.show_exceptions" => false } + end assert_equal JSON::ParserError, exception.cause.class assert_equal exception.cause.message, exception.message ensure diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb index e572c722a0..eb4bb14ed1 100644 --- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb @@ -142,7 +142,7 @@ class MultipartParamsParsingTest < ActionDispatch::IntegrationTest test "uploads and reads binary file" do with_test_routing do - fixture = FIXTURE_PATH + "/mona_lisa.jpg" + fixture = FIXTURE_PATH + "/ruby_on_rails.jpg" params = { uploaded_data: fixture_file_upload(fixture, "image/jpg") } post "/read", params: params end |