aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/new_render_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index ee971c3b78..ba4a5f7ec3 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -58,6 +58,10 @@ class TestController < ActionController::Base
render :action => "hello_world", :layout => false
end
+ def rendering_nothing_on_layout
+ render :nothing => true
+ end
+
def builder_layout_test
render :action => "hello"
end
@@ -85,7 +89,7 @@ class TestController < ActionController::Base
private
def determine_layout
case action_name
- when "layout_test", "rendering_without_layout"
+ when "layout_test", "rendering_without_layout", "rendering_nothing_on_layout"
"layouts/standard"
when "builder_layout_test"
"layouts/builder"
@@ -199,6 +203,11 @@ class RenderTest < Test::Unit::TestCase
assert_equal "Hello world!", process_request.body
end
+ def test_rendering_nothing_on_layout
+ @request.action = "rendering_nothing_on_layout"
+ assert_equal "", process_request.body
+ end
+
def test_render_xml_with_layouts
@request.action = "builder_layout_test"
assert_equal "<wrapper>\n<html>\n <p>Hello </p>\n<p>This is grand!</p>\n</html>\n</wrapper>\n", process_request.body