diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-12 03:09:39 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-12 03:09:39 +0000 |
commit | 7501451d7f417a304a56ac65f0b203c942920732 (patch) | |
tree | 8d896488bd8e275016f9c3ae3559d76a2c9bdf61 /actionpack/test/controller | |
parent | fb63fc67fb8210fede6fea1837fd6a9c69fa499f (diff) | |
download | rails-7501451d7f417a304a56ac65f0b203c942920732.tar.gz rails-7501451d7f417a304a56ac65f0b203c942920732.tar.bz2 rails-7501451d7f417a304a56ac65f0b203c942920732.zip |
don't misbehave when redirecting to nil. Closes #10272 [farleyknight]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rwxr-xr-x | actionpack/test/controller/redirect_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index 5642792ca2..571d5b1f5a 100755 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -77,6 +77,10 @@ class RedirectController < ActionController::Base redirect_to Workshop.new(5, true) end + def redirect_to_nil + redirect_to nil + end + def rescue_errors(e) raise e end def rescue_action(e) raise end @@ -215,6 +219,13 @@ class RedirectTest < Test::Unit::TestCase get :redirect_to_new_record assert_equal "http://test.host/workshops", redirect_to_url end + + def test_redirect_to_nil + assert_raises(ActionController::ActionControllerError) do + get :redirect_to_nil + end + end + end module ModuleTest |