aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-10-30 15:07:47 -0500
committerJoshua Peek <josh@joshpeek.com>2008-10-30 15:07:47 -0500
commitec38c84ce1ff7f0888becc15e3f58337ca807e25 (patch)
tree2ef45c777eeef49d42f6fa4b1589f97ffad90435 /actionpack/test/template
parentef53d915164da7f757d03c4a70fe38e374c08b14 (diff)
downloadrails-ec38c84ce1ff7f0888becc15e3f58337ca807e25.tar.gz
rails-ec38c84ce1ff7f0888becc15e3f58337ca807e25.tar.bz2
rails-ec38c84ce1ff7f0888becc15e3f58337ca807e25.zip
Dup local assigns for partial collections so nil values doesn't get overwritten [#1250 state:resolved]
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/render_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index da8c782880..476e651757 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -115,6 +115,10 @@ class ViewRenderTest < Test::Unit::TestCase
assert_nil @view.render(:partial => "test/customer", :collection => nil)
end
+ def test_render_partial_with_nil_values_in_collection
+ assert_equal "Hello: davidHello: Anonymous", @view.render(:partial => "test/customer", :collection => [ Customer.new("david"), nil ])
+ end
+
def test_render_partial_with_empty_array_should_return_nil
assert_nil @view.render(:partial => [])
end