From db5839107951b000633fa8405f78e5c315b6656a Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 23 Jun 2008 20:32:26 +0300 Subject: Remove old broken follow_redirect from functional tests. Still works in integration tests. The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes. --- .../test/controller/action_pack_assertions_test.rb | 16 ---------------- actionpack/test/controller/test_test.rb | 18 ------------------ 2 files changed, 34 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 7a90a9408e..eae05aacab 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -419,22 +419,6 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase assert_equal "Mr. David", @response.body end - def test_follow_redirect - process :redirect_to_action - assert_redirected_to :action => "flash_me" - - follow_redirect - assert_equal 1, @request.parameters["id"].to_i - - assert "Inconceivable!", @response.body - end - - def test_follow_redirect_outside_current_action - process :redirect_to_controller - assert_redirected_to :controller => "elsewhere", :action => "flash_me" - - assert_raises(RuntimeError, "Can't follow redirects outside of current controller (elsewhere)") { follow_redirect } - end def test_assert_redirection_fails_with_incorrect_controller process :redirect_to_controller diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 38898a1f75..b624005a57 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -566,24 +566,6 @@ XML assert_raise(RuntimeError) { ActionController::TestUploadedFile.new('non_existent_file') } end - def test_assert_follow_redirect_to_same_controller - with_foo_routing do |set| - get :redirect_to_same_controller - assert_response :redirect - assert_redirected_to :controller => 'test_test/test', :action => 'test_uri', :id => 5 - assert_nothing_raised { follow_redirect } - end - end - - def test_assert_follow_redirect_to_different_controller - with_foo_routing do |set| - get :redirect_to_different_controller - assert_response :redirect - assert_redirected_to :controller => 'fail', :id => 5 - assert_raise(RuntimeError) { follow_redirect } - end - end - def test_redirect_url_only_cares_about_location_header get :create assert_response :created -- cgit v1.2.3