mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
0919dbf6b6
commit
409d56abda
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue