diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-08-29 13:41:53 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-29 13:43:30 +0100 |
commit | 6577942b61b98e3bca54c0af3df57f8334b832b9 (patch) | |
tree | d60f3ada648328f761a9023bfecfbb80c466dfba /actionpack/test/controller | |
parent | 85070b5e5679221be0f44ce1886be99432d53dd0 (diff) | |
download | rails-6577942b61b98e3bca54c0af3df57f8334b832b9.tar.gz rails-6577942b61b98e3bca54c0af3df57f8334b832b9.tar.bz2 rails-6577942b61b98e3bca54c0af3df57f8334b832b9.zip |
Deprecate render_component.
Please install render_component plugin from http://github.com/rails/render_component/tree/master
if your application uses this functionality.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/components_test.rb | 66 |
1 files changed, 41 insertions, 25 deletions
diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb index 71e8a18071..4d36fc411d 100644 --- a/actionpack/test/controller/components_test.rb +++ b/actionpack/test/controller/components_test.rb @@ -77,49 +77,64 @@ class ComponentsTest < Test::Unit::TestCase end def test_calling_from_controller - get :calling_from_controller - assert_equal "Lady of the House, speaking", @response.body + assert_deprecated do + get :calling_from_controller + assert_equal "Lady of the House, speaking", @response.body + end end def test_calling_from_controller_with_params - get :calling_from_controller_with_params - assert_equal "David of the House, speaking", @response.body + assert_deprecated do + get :calling_from_controller_with_params + assert_equal "David of the House, speaking", @response.body + end end def test_calling_from_controller_with_different_status_code - get :calling_from_controller_with_different_status_code - assert_equal 500, @response.response_code + assert_deprecated do + get :calling_from_controller_with_different_status_code + assert_equal 500, @response.response_code + end end def test_calling_from_template - get :calling_from_template - assert_equal "Ring, ring: Lady of the House, speaking", @response.body + assert_deprecated do + get :calling_from_template + assert_equal "Ring, ring: Lady of the House, speaking", @response.body + end end def test_etag_is_set_for_parent_template_when_calling_from_template - get :calling_from_template - expected_etag = etag_for("Ring, ring: Lady of the House, speaking") - assert_equal expected_etag, @response.headers['ETag'] + assert_deprecated do + get :calling_from_template + expected_etag = etag_for("Ring, ring: Lady of the House, speaking") + assert_equal expected_etag, @response.headers['ETag'] + end end def test_internal_calling - get :internal_caller - assert_equal "Are you there? Yes, ma'am", @response.body + assert_deprecated do + get :internal_caller + assert_equal "Are you there? Yes, ma'am", @response.body + end end def test_flash - get :set_flash - assert_equal 'My stoney baby', flash[:notice] - get :use_flash - assert_equal 'My stoney baby', @response.body - get :use_flash - assert_equal 'no flash', @response.body + assert_deprecated do + get :set_flash + assert_equal 'My stoney baby', flash[:notice] + get :use_flash + assert_equal 'My stoney baby', @response.body + get :use_flash + assert_equal 'no flash', @response.body + end end def test_component_redirect_redirects - get :calling_redirected - - assert_redirected_to :controller=>"callee", :action => "being_called" + assert_deprecated do + get :calling_redirected + assert_redirected_to :controller=>"callee", :action => "being_called" + end end def test_component_multiple_redirect_redirects @@ -128,9 +143,10 @@ class ComponentsTest < Test::Unit::TestCase end def test_component_as_string_redirect_renders_redirected_action - get :calling_redirected_as_string - - assert_equal "Lady of the House, speaking", @response.body + assert_deprecated do + get :calling_redirected_as_string + assert_equal "Lady of the House, speaking", @response.body + end end protected |