diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index cba21fc4cb..eb23ed0c5b 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -73,6 +73,10 @@ class TestController < ActionController::Base head :ok end + def location + render :xml => "<hello/>", :location => "http://example.com", :status => 201 + end + def greeting # let's just rely on the template end @@ -368,6 +372,12 @@ class RenderTest < Test::Unit::TestCase assert_equal '<test>passed formatted html erb</test>', @response.body end + def test_rendering_with_location_should_set_header + get :location + assert_equal "http://example.com", @response.headers["Location"] + end + + protected def assert_deprecated_render(&block) assert_deprecated(/render/, &block) |