aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r--actionpack/test/controller/render_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 6e37a7f142..66429662e6 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -43,6 +43,15 @@ class TestController < ActionController::Base
render_text "hello world", "404 Moved"
end
+ def render_text_appendix
+ render_text "hello world"
+ render_text ", goodbye!", "404 Not Found", true
+ end
+
+ def render_nothing_with_appendix
+ render_text "appended", nil, true
+ end
+
def render_xml_hello
@name = "David"
render "test/hello"
@@ -160,6 +169,18 @@ class RenderTest < Test::Unit::TestCase
assert_response 404
end
+ def test_do_with_render_text_appendix
+ get :render_text_appendix
+ assert_response 404
+ assert_equal 'hello world, goodbye!', @response.body
+ end
+
+ def test_do_with_render_nothing_with_appendix
+ get :render_nothing_with_appendix
+ assert_response 200
+ assert_equal 'appended', @response.body
+ end
+
def test_attempt_to_access_object_method
assert_raises(ActionController::UnknownAction, "No action responded to [clone]") { get :clone }
end