diff options
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index a29a6b9cd2..7cb3643db5 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -98,6 +98,10 @@ class NewRenderTestController < ActionController::Base render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" } end + def empty_partial_collection + render :partial => "customer", :collection => [] + end + def hello_in_a_string @customers = [ Customer.new("david"), Customer.new("mary") ] render :text => "How's there? #{render_to_string("test/list")}" @@ -358,6 +362,11 @@ class NewRenderTest < Test::Unit::TestCase assert_equal "Bonjour: davidBonjour: mary", @response.body end + def test_empty_partial_collection + get :empty_partial_collection + assert_equal " ", @response.body + end + def test_render_text_with_assigns get :render_text_with_assigns assert_equal "world", assigns["hello"] |