]> source.dussan.org Git - redmine.git/commitdiff
test: route: simplify roles tests
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 26 Dec 2011 05:54:12 +0000 (05:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 26 Dec 2011 05:54:12 +0000 (05:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8371 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing/roles_test.rb

index cd966636c22c1c909ee91aa714a0cf2b13cbf370..bdaa56f8efe96faa7b6cbf5ec4e2924554918e7f 100644 (file)
@@ -43,13 +43,11 @@ class RoutingRolesTest < ActionController::IntegrationTest
         { :method => 'delete', :path => "/roles/2" },
         { :controller => 'roles', :action => 'destroy', :id => '2' }
       )
-    assert_routing(
-        { :method => 'get', :path => "/roles/permissions" },
-        { :controller => 'roles', :action => 'permissions' }
-      )
-    assert_routing(
-        { :method => 'post', :path => "/roles/permissions" },
-        { :controller => 'roles', :action => 'permissions' }
-      )
+    ["get", "post"].each do |method|
+      assert_routing(
+          { :method => method, :path => "/roles/permissions" },
+          { :controller => 'roles', :action => 'permissions' }
+        )
+    end
   end
 end