diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-06 20:52:57 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-06 20:52:57 +0000 |
commit | ca4c7ab362d0110bfade496ca66b30bafdb7f25e (patch) | |
tree | e5a968b9dca4c2ad2f5d936c693286a548c4702f /actionpack/test | |
parent | 523658c1dffc6d125898caac6bf43118fbb3e27e (diff) | |
download | rails-ca4c7ab362d0110bfade496ca66b30bafdb7f25e.tar.gz rails-ca4c7ab362d0110bfade496ca66b30bafdb7f25e.tar.bz2 rails-ca4c7ab362d0110bfade496ca66b30bafdb7f25e.zip |
Support render :text => nil. Closes #6684.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 1d83b37658..ddb77ee6b2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -57,6 +57,14 @@ class TestController < ActionController::Base render :text => "hello world", :status => 404 end + def render_text_with_nil + render :text => nil + end + + def render_text_with_false + render :text => false + end + def render_nothing_with_appendix render :text => "appended" end @@ -263,6 +271,17 @@ class RenderTest < Test::Unit::TestCase assert_equal 'hello world', @response.body end + def test_render_text_with_nil + get :render_text_with_nil + assert_response 200 + assert_equal '', @response.body + end + + def test_render_text_with_false + get :render_text_with_false + assert_equal 'false', @response.body + end + def test_render_nothing_with_appendix get :render_nothing_with_appendix assert_response 200 |