diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-02 12:55:08 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-02 12:55:08 -0200 |
commit | 9fd6011f40a0fb7792867ef1a48ac0dbbb2ffee0 (patch) | |
tree | 78b631fb0e057b7a315cadbec187b790000ad31c /actionpack/test | |
parent | 47af13cfb562a8048c68ffe59687eacb9d5a9ad9 (diff) | |
parent | 083f657c0f1990e980d33f89f44d8943a9270475 (diff) | |
download | rails-9fd6011f40a0fb7792867ef1a48ac0dbbb2ffee0.tar.gz rails-9fd6011f40a0fb7792867ef1a48ac0dbbb2ffee0.tar.bz2 rails-9fd6011f40a0fb7792867ef1a48ac0dbbb2ffee0.zip |
Merge pull request #17873 from kirs/refactor-debug-erb
Refactor debug view
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 5e87744f6b..1e5ed60b09 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -241,6 +241,29 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest assert_match(/RuntimeError\n\s+in FeaturedTileController/, body) end + test "show formatted params" do + @app = DevelopmentApp + + params = { + 'id' => 'unknown', + 'someparam' => { + 'foo' => 'bar', + 'abc' => 'goo' + } + } + + get("/runtime_error", {}, { + 'action_dispatch.show_exceptions' => true, + 'action_dispatch.request.parameters' => { + 'action' => 'show', + 'controller' => 'featured_tile' + }.merge(params) + }) + assert_response 500 + + assert_includes(body, CGI.escapeHTML(PP.pp(params, "", 200))) + end + test "sets the HTTP charset parameter" do @app = DevelopmentApp |