diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 22:44:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 22:44:49 +0000 |
commit | 409d56abda45ee380d6a903cbf835e7a770061d8 (patch) | |
tree | 2f5c6632a439ece2b7d88cf8b7c7938c97ac967f | |
parent | 0919dbf6b63a4aaa49a2855c37e79a90937290e1 (diff) | |
download | rails-409d56abda45ee380d6a903cbf835e7a770061d8.tar.gz rails-409d56abda45ee380d6a903cbf835e7a770061d8.tar.bz2 rails-409d56abda45ee380d6a903cbf835e7a770061d8.zip |
Introduce to_param to assert_redirected_to #880
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/assertions/action_pack_assertions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/assertions/action_pack_assertions.rb b/actionpack/lib/action_controller/assertions/action_pack_assertions.rb index c6f1e0cc13..d1d5cafc08 100644 --- a/actionpack/lib/action_controller/assertions/action_pack_assertions.rb +++ b/actionpack/lib/action_controller/assertions/action_pack_assertions.rb @@ -137,7 +137,7 @@ module Test #:nodoc: if options.is_a?(Symbol) response.redirected_to == options else - options.keys.all? { |k| options[k] == response.redirected_to[k] } + options.keys.all? { |k| options[k] == ( response.redirected_to[k].respond_to?(:to_param) ? response.redirected_to[k].to_param : response.redirected_to[k] if response.redirected_to[k] ) } end end end |