From f70a5397f29c495f91ccf366ba9f48bb2cc4c022 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 15 Dec 2011 01:47:42 +0000 Subject: [PATCH] test: replace "should_route" of "test_custom_fields" to "assert_routing" at integration/routing_test.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8215 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/routing_test.rb | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index a72ea7bd6..c2b635123 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -96,13 +96,31 @@ class RoutingTest < ActionController::IntegrationTest ) end - context "custom_fields" do - should_route :get, "/custom_fields", :controller => 'custom_fields', :action => 'index' - should_route :get, "/custom_fields/new", :controller => 'custom_fields', :action => 'new' - should_route :post, "/custom_fields", :controller => 'custom_fields', :action => 'create' - should_route :get, "/custom_fields/2/edit", :controller => 'custom_fields', :action => 'edit', :id => 2 - should_route :put, "/custom_fields/2", :controller => 'custom_fields', :action => 'update', :id => 2 - should_route :delete, "/custom_fields/2", :controller => 'custom_fields', :action => 'destroy', :id => 2 + def test_custom_fields + assert_routing( + { :method => 'get', :path => "/custom_fields" }, + { :controller => 'custom_fields', :action => 'index' } + ) + assert_routing( + { :method => 'get', :path => "/custom_fields/new" }, + { :controller => 'custom_fields', :action => 'new' } + ) + assert_routing( + { :method => 'post', :path => "/custom_fields" }, + { :controller => 'custom_fields', :action => 'create' } + ) + assert_routing( + { :method => 'get', :path => "/custom_fields/2/edit" }, + { :controller => 'custom_fields', :action => 'edit', :id => '2' } + ) + assert_routing( + { :method => 'put', :path => "/custom_fields/2" }, + { :controller => 'custom_fields', :action => 'update', :id => '2' } + ) + assert_routing( + { :method => 'delete', :path => "/custom_fields/2" }, + { :controller => 'custom_fields', :action => 'destroy', :id => '2' } + ) end context "documents" do -- 2.39.5