From ca85caca0dd10f4e4950173094f8a0577cfe2560 Mon Sep 17 00:00:00 2001 From: kennyj Date: Mon, 15 Jul 2013 02:11:43 +0900 Subject: Fix default rendered format problem when calling render method without :content_type option. Closes #11393. --- actionview/test/template/render_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionview/test') diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index 8cffe73cce..928dfb092d 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -41,6 +41,11 @@ module RenderTestCases assert_match "No Comment", @view.render(:template => "comments/empty", :formats => [:xml]) end + def test_rendered_format_without_format + @view.render(:inline => "test") + assert_equal :html, @view.lookup_context.rendered_format + end + def test_render_partial_implicitly_use_format_of_the_rendered_template @view.lookup_context.formats = [:json] assert_equal "Hello world", @view.render(:template => "test/one", :formats => [:html]) -- cgit v1.2.3