Introduce to_param to assert_redirected_to #880

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2005-03-20 22:44:49 +00:00
parent 0919dbf6b6
commit 409d56abda
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ module Test #:nodoc:
if options.is_a?(Symbol) if options.is_a?(Symbol)
response.redirected_to == options response.redirected_to == options
else 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 end
end end