diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-05-08 21:28:27 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-05-08 21:28:50 -0700 |
commit | 5e03239d59db7b21ceda576ce52b7fab3ad58c2d (patch) | |
tree | 8476799509da9af9ccf7d721f9101961e9e6a243 /actionpack/test | |
parent | c0df1e8c08a27a7de489dad7492015d68f2c76f7 (diff) | |
download | rails-5e03239d59db7b21ceda576ce52b7fab3ad58c2d.tar.gz rails-5e03239d59db7b21ceda576ce52b7fab3ad58c2d.tar.bz2 rails-5e03239d59db7b21ceda576ce52b7fab3ad58c2d.zip |
Fix that JSON and XML exception responses should give the HTTP error message for their status, by default, not the message from the underlying exception
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/show_exceptions_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/show_exceptions_test.rb b/actionpack/test/controller/show_exceptions_test.rb index 69bf4b7720..ff23b22040 100644 --- a/actionpack/test/controller/show_exceptions_test.rb +++ b/actionpack/test/controller/show_exceptions_test.rb @@ -75,7 +75,7 @@ module ShowExceptions get "/", {}, 'HTTP_ACCEPT' => 'application/json' assert_response :internal_server_error assert_equal 'application/json', response.content_type.to_s - assert_equal({ :status => '500', :error => 'boom!' }.to_json, response.body) + assert_equal({ :status => '500', :error => 'Internal Server Error' }.to_json, response.body) end def test_render_xml_exception @@ -83,7 +83,7 @@ module ShowExceptions get "/", {}, 'HTTP_ACCEPT' => 'application/xml' assert_response :internal_server_error assert_equal 'application/xml', response.content_type.to_s - assert_equal({ :status => '500', :error => 'boom!' }.to_xml, response.body) + assert_equal({ :status => '500', :error => 'Internal Server Error' }.to_xml, response.body) end def test_render_fallback_exception |