]> source.dussan.org Git - redmine.git/commitdiff
test: replace "should_route" of "groups" to "assert_routing" at integration/routing_t...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 15 Dec 2011 07:06:37 +0000 (07:06 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 15 Dec 2011 07:06:37 +0000 (07:06 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8221 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing_test.rb

index aa5f423f89bc823b37131579ac0d1e26414c2691..01e858a67b7d4e3cb4063b1772867f4d15720c1a 100644 (file)
@@ -166,10 +166,17 @@ class RoutingTest < ActionController::IntegrationTest
     should_route :put, "/enumerations/2", :controller => 'enumerations', :action => 'update', :id => 2
     should_route :delete, "/enumerations/2", :controller => 'enumerations', :action => 'destroy', :id => 2
   end
-  
-  context "groups" do
-    should_route :post,   "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567'
-    should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12'
+
+  def test_groups
+    assert_routing(
+        { :method => 'post', :path => "/groups/567/users" },
+        { :controller => 'groups', :action => 'add_users', :id => '567' }
+      )
+    assert_routing(
+        { :method => 'delete', :path => "/groups/567/users/12" },
+        { :controller => 'groups', :action => 'remove_user', :id => '567',
+          :user_id => '12' }
+      )
   end
 
   def test_issues_rest_actions