aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 09d9e65d38..e1f9b7dc9c 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -553,6 +553,10 @@ class TestController < ActionController::Base
render :partial => 'partial'
end
+ def partial_html_erb
+ render :partial => 'partial_html_erb'
+ end
+
def render_to_string_with_partial
@partial_only = render_to_string :partial => "partial_only"
@partial_with_locals = render_to_string :partial => "customer", :locals => { :customer => Customer.new("david") }
@@ -1272,6 +1276,15 @@ class RenderTest < ActionController::TestCase
assert_equal "text/html", @response.content_type
end
+ def test_render_html_formatted_partial_even_with_other_mime_time_in_accept
+ @request.accept = "text/javascript, text/html"
+
+ get :partial_html_erb
+
+ assert_equal "partial.html.erb", @response.body.strip
+ assert_equal "text/html", @response.content_type
+ end
+
def test_should_render_html_partial_with_formats
get :partial_formats_html
assert_equal "partial html", @response.body