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

test/integration/routing/wikis_test.rb

index 2b0899dc19d152487c85e7c15e5ba947e54c1393..c37778328a015656d5afb588d763a76c295e62a2 100644 (file)
@@ -19,17 +19,15 @@ require File.expand_path('../../../test_helper', __FILE__)
 
 class RoutingWikisTest < ActionController::IntegrationTest
   def test_wikis_plural_admin_setup
-    assert_routing(
-        { :method => 'get', :path => "/projects/ladida/wiki/destroy" },
-        { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
-      )
+    ["get", "post"].each do |method|
+      assert_routing(
+          { :method => method, :path => "/projects/ladida/wiki/destroy" },
+          { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
+        )
+    end
     assert_routing(
         { :method => 'post', :path => "/projects/ladida/wiki" },
         { :controller => 'wikis', :action => 'edit', :id => 'ladida' }
       )
-    assert_routing(
-        { :method => 'post', :path => "/projects/ladida/wiki/destroy" },
-        { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
-      )
   end
 end