diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-03-15 23:39:25 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-03-17 14:15:55 +0100 |
commit | 7130f9159146776067d334b5043b789860b92761 (patch) | |
tree | c06ee6603c80dfdc7c5b35a0a6cd11ad800fd2ed /actionpack/test/controller | |
parent | 1eb6189404f53ae59e4cb47ef9d5ad3a9bec3064 (diff) | |
download | rails-7130f9159146776067d334b5043b789860b92761.tar.gz rails-7130f9159146776067d334b5043b789860b92761.tar.bz2 rails-7130f9159146776067d334b5043b789860b92761.zip |
Add missing test for #5308
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index daa2676e22..3cc8a9ddf3 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -560,6 +560,12 @@ class TestController < ActionController::Base render :template => "test/with_partial", :formats => [:text] end + def render_template_within_a_template_with_other_format + render :template => "test/with_xml_template", + :formats => [:html], + :layout => "with_html_partial" + end + def partial_with_counter render :partial => "counter", :locals => { :counter_counter => 5 } end @@ -1289,6 +1295,13 @@ class RenderTest < ActionController::TestCase assert_equal "text/plain", @response.content_type end + def test_render_template_within_a_template_with_other_format + get :render_template_within_a_template_with_other_format + expected = "only html partial<p>This is grand!</p>" + assert_equal expected, @response.body.strip + assert_equal "text/html", @response.content_type + end + def test_partial_with_counter get :partial_with_counter assert_equal "5", @response.body |