diff options
author | Stephen Becker IV <github@deathbyescalator.com> | 2013-06-18 14:22:30 -0700 |
---|---|---|
committer | Stephen Becker IV <github@deathbyescalator.com> | 2013-06-19 06:29:52 -0700 |
commit | 8ffd139edd062fe3e888895d4af80730a0798758 (patch) | |
tree | 4c2b60f55cb322a4739363a4125ccc6de78ff84e /actionpack/test/controller | |
parent | 0f89689b2357f39da52515b83391db58689a1361 (diff) | |
download | rails-8ffd139edd062fe3e888895d4af80730a0798758.tar.gz rails-8ffd139edd062fe3e888895d4af80730a0798758.tar.bz2 rails-8ffd139edd062fe3e888895d4af80730a0798758.zip |
Fix undefined method `ref' for nil:NilClass for bad accept headers
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 72411ec900..fd835795c0 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1089,6 +1089,12 @@ class RenderTest < ActionController::TestCase assert_equal '<test>passed formatted html erb</test>', @response.body end + def test_should_render_formatted_html_erb_template_with_bad_accepts_header + @request.env["HTTP_ACCEPT"] = "; a=dsf" + get :formatted_xml_erb + assert_equal '<test>passed formatted html erb</test>', @response.body + end + def test_should_render_formatted_html_erb_template_with_faulty_accepts_header @request.accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, appliction/x-shockwave-flash, */*" get :formatted_xml_erb |