From f024aabee37520e8c894a83710fc121c0056dd2b Mon Sep 17 00:00:00 2001 From: Nathaniel Talbott Date: Thu, 10 Sep 2009 21:15:18 -0400 Subject: Fix filtering parameters when there are Fixnum or other un-dupable values. [#3184 state:committed] Signed-off-by: Jeremy Kemper --- actionpack/test/controller/filter_params_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb index f7864745eb..19232c6bc9 100644 --- a/actionpack/test/controller/filter_params_test.rb +++ b/actionpack/test/controller/filter_params_test.rb @@ -35,6 +35,7 @@ class FilterParamTest < ActionController::TestCase test_hashes = [[{},{},[]], [{'foo'=>nil},{'foo'=>nil},[]], [{'foo'=>'bar'},{'foo'=>'bar'},[]], + [{'foo'=>1},{'foo'=>1},[]], [{'foo'=>'bar'},{'foo'=>'bar'},%w'food'], [{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'], [{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'], -- cgit v1.2.3 From a3fcfd819b85e89286ffe9dfc3a3f22555cd55fc Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 13 Sep 2009 17:52:33 -0500 Subject: Need to reset session for AP rescue tests after altering the route set --- actionpack/test/controller/rescue_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/rescue_test.rb b/actionpack/test/controller/rescue_test.rb index 490a4ff3b3..23408712e9 100644 --- a/actionpack/test/controller/rescue_test.rb +++ b/actionpack/test/controller/rescue_test.rb @@ -359,6 +359,7 @@ class RescueTest < ActionController::IntegrationTest map.connect 'invalid', :controller => "rescue_test/test", :action => 'invalid' map.connect 'b00m', :controller => "rescue_test/test", :action => 'b00m' end + reset! yield end end -- cgit v1.2.3 From a0e43073e22bab9c4aaafa419f00c2032f8d28fd Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 13 Sep 2009 18:43:16 -0500 Subject: Rewrite resource routing tests that are coupled to the router implementation --- actionpack/test/controller/resources_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 0b639e363d..5b47de19ae 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -135,7 +135,7 @@ class ResourcesTest < ActionController::TestCase def test_with_custom_conditions with_restful_routing :messages, :conditions => { :subdomain => 'app' } do - assert_equal 'app', ActionController::Routing::Routes.named_routes.routes[:messages].conditions[:subdomain] + assert ActionController::Routing::Routes.recognize_path("/messages", :method => :get, :subdomain => 'app') end end @@ -1130,7 +1130,8 @@ class ResourcesTest < ActionController::TestCase map.resource :product end - assert_equal :get, set.named_routes.routes[:product].conditions[:method] + assert_routing '/product', :controller => 'products', :action => 'show' + assert set.recognize_path("/product", :method => :get) end end -- cgit v1.2.3