diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-02 15:21:19 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-02 15:21:19 -0700 |
commit | 186fee48c796b104b76ef69decb32ef396f435db (patch) | |
tree | 9f8b8c8c83af7bd2913c1283f51fd3c3492fea82 /actionpack/lib/action_dispatch/testing/assertions | |
parent | 945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8 (diff) | |
parent | 24affdc88c4a4af03ce1ec5b23c3def18b90effe (diff) | |
download | rails-186fee48c796b104b76ef69decb32ef396f435db.tar.gz rails-186fee48c796b104b76ef69decb32ef396f435db.tar.bz2 rails-186fee48c796b104b76ef69decb32ef396f435db.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-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 |