aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r--actionpack/test/controller/new_render_test.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index ad1415aca3..3d1e6e794b 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -75,6 +75,10 @@ class TestController < ActionController::Base
render :partial => true
end
+ def partial_only_with_layout
+ render :partial => "partial_only", :layout => nil
+ end
+
def hello_in_a_string
@customers = [ Customer.new("david"), Customer.new("mary") ]
render :text => "How's there? #{render_to_string("test/list")}"
@@ -89,7 +93,9 @@ class TestController < ActionController::Base
private
def determine_layout
case action_name
- when "layout_test", "rendering_without_layout", "rendering_nothing_on_layout"
+ when "layout_test", "rendering_without_layout",
+ "rendering_nothing_on_layout", "render_text_hello_world",
+ "partial_only", "partial_only_with_layout"
"layouts/standard"
when "builder_layout_test"
"layouts/builder"
@@ -219,6 +225,11 @@ class RenderTest < Test::Unit::TestCase
assert_equal "only partial", @response.body
end
+ def test_partial_only_with_layout
+ get :partial_only_with_layout
+ assert_equal "<html>only partial</html>", @response.body
+ end
+
def test_render_to_string
get :hello_in_a_string
assert_equal "How's there? Hello: davidHello: mary", @response.body