diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-02 14:23:44 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-02 14:23:44 -0500 |
commit | 3900f4007ee6463b8936af23c04017a900673866 (patch) | |
tree | 216e69d5b5426702fe7009f3203ee897e5f92bc2 /actionpack/lib/action_dispatch/testing/assertions/response.rb | |
parent | 3be3470fab788856b4559742434f195cc6b1009a (diff) | |
download | rails-3900f4007ee6463b8936af23c04017a900673866.tar.gz rails-3900f4007ee6463b8936af23c04017a900673866.tar.bz2 rails-3900f4007ee6463b8936af23c04017a900673866.zip |
Deprecate assert_redirect_to's partial hash matching
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions/response.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/response.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/response.rb b/actionpack/lib/action_dispatch/testing/assertions/response.rb index a72ce9084f..92e3da580e 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/response.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/response.rb @@ -60,14 +60,9 @@ module ActionDispatch validate_request! assert_response(:redirect, message) - return true if options == @response.redirected_to + return true if options == @response.location - # Support partial arguments for hash redirections - if options.is_a?(Hash) && @response.redirected_to.is_a?(Hash) - return true if options.all? {|(key, value)| @response.redirected_to[key] == value} - end - - redirected_to_after_normalisation = normalize_argument_to_redirection(@response.redirected_to) + redirected_to_after_normalisation = normalize_argument_to_redirection(@response.location) options_after_normalisation = normalize_argument_to_redirection(options) if redirected_to_after_normalisation != options_after_normalisation |