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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index 3f298d81f3..a0b493af9d 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -30,6 +30,12 @@ module RenderTestCases
assert_equal ORIGINAL_LOCALES, I18n.available_locales.map(&:to_s).sort
end
+ 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)
+ end
+
def test_render_without_options
e = assert_raises(ArgumentError) { @view.render() }
assert_match(/You invoked render but did not give any of (.+) option\./, e.message)