diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-11 13:15:53 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-11 13:15:53 -0800 |
commit | 3b3975b7dbc115636188126eed2a15bebd4e2c98 (patch) | |
tree | 5e8f1b51c0aea5ce2d7cfb0722c273aa41861661 /actionview/test/template | |
parent | 38f9e41f2c4b64377ffb036c53873dbfb51546cf (diff) | |
download | rails-3b3975b7dbc115636188126eed2a15bebd4e2c98.tar.gz rails-3b3975b7dbc115636188126eed2a15bebd4e2c98.tar.bz2 rails-3b3975b7dbc115636188126eed2a15bebd4e2c98.zip |
Add a failing test for #35222
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/render_test.rb | 6 |
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) |