aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template')
-rw-r--r--actionview/test/template/render_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index d189b2aa87..7f76916b72 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -301,6 +301,15 @@ module RenderTestCases
@view.render(partial: "test/local_inspector", collection: [ Customer.new("mary") ])
end
+ def test_render_partial_collection_with_different_partials_still_provides_partial_iteration
+ a = {}
+ b = {}
+ def a.to_partial_path; "test/partial_iteration_1"; end
+ def b.to_partial_path; "test/partial_iteration_2"; end
+
+ assert_equal "local-variable\nlocal-variable", @controller_view.render([a, b])
+ end
+
def test_render_partial_with_empty_collection_should_return_nil
assert_nil @view.render(partial: "test/customer", collection: [])
end