aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/render_test.rb')
-rw-r--r--actionview/test/template/render_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index a0b493af9d..e36babfd25 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -33,7 +33,16 @@ module RenderTestCases
def test_implicit_format_comes_from_parent_template
rendered_templates = JSON.parse(@controller_view.render(template: "test/mixing_formats"))
assert_equal({ "format" => "HTML",
- "children" => ["XML", "HTML"]}, rendered_templates)
+ "children" => ["XML", "HTML"] }, rendered_templates)
+ end
+
+ def test_implicit_format_comes_from_parent_template_cascading
+ rendered_templates = JSON.parse(@controller_view.render(template: "test/mixing_formats_deep"))
+ assert_equal({ "format" => "HTML",
+ "children" => [
+ { "format" => "XML", "children" => ["XML"] },
+ { "format" => "HTML", "children" => ["HTML"] },
+ ] }, rendered_templates)
end
def test_render_without_options