diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-07-12 11:42:41 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-07-12 11:42:41 +0200 |
commit | e53f5fe696d692f1985981c34bb311e898fe3c72 (patch) | |
tree | 9fb8f244d277cc0bc8555a57866955a5d062639f /actionpack/test | |
parent | 50b5c6845ed1645cf25613024ef04187385f8dcd (diff) | |
download | rails-e53f5fe696d692f1985981c34bb311e898fe3c72.tar.gz rails-e53f5fe696d692f1985981c34bb311e898fe3c72.tar.bz2 rails-e53f5fe696d692f1985981c34bb311e898fe3c72.zip |
Restore support for partial matches in assert_redirected_to
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
Diffstat (limited to 'actionpack/test')
-rwxr-xr-x | actionpack/test/controller/redirect_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index 8b72426d10..28da5c6163 100755 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -227,6 +227,11 @@ class RedirectTest < Test::Unit::TestCase assert_redirected_to Workshop.new(5, true) end + def test_redirect_with_partial_params + get :module_redirect + assert_redirected_to :action => 'hello_world' + end + def test_redirect_to_nil assert_raises(ActionController::ActionControllerError) do get :redirect_to_nil |