aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/render_test.rb')
-rw-r--r--actionpack/test/template/render_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 8a582030f6..525ef0d726 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -32,6 +32,12 @@ module RenderTestCases
assert_equal "Hello world!", @view.render(:file => "test/hello_world")
end
+ # Test if :formats, :locale etc. options are passed correctly to the resolvers.
+ def test_render_file_with_format
+ assert_equal "<h1>No Comment</h1>", @view.render(:file => "comments/empty", :formats => [:html])
+ assert_equal "<error>No Comment</error>", @view.render(:file => "comments/empty", :formats => [:xml])
+ end
+
def test_render_file_with_localization
old_locale, @view.locale = @view.locale, :da
assert_equal "Hey verden", @view.render(:file => "test/hello_world")