From 409d56abda45ee380d6a903cbf835e7a770061d8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 20 Mar 2005 22:44:49 +0000 Subject: Introduce to_param to assert_redirected_to #880 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/assertions/action_pack_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') 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 -- cgit v1.2.3