aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2019-02-11 15:24:55 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2019-02-11 17:55:53 -0800
commit9439a18bf76b3b7c759340abf0d7a5fb17fc82f7 (patch)
tree3e784624ac93c5bd1c87bf366788af36689e7c28 /actionview/test/template
parent3b3975b7dbc115636188126eed2a15bebd4e2c98 (diff)
downloadrails-9439a18bf76b3b7c759340abf0d7a5fb17fc82f7.tar.gz
rails-9439a18bf76b3b7c759340abf0d7a5fb17fc82f7.tar.bz2
rails-9439a18bf76b3b7c759340abf0d7a5fb17fc82f7.zip
Adding another failing test case
Diffstat (limited to 'actionview/test/template')
-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