]> source.dussan.org Git - redmine.git/commitdiff
test: replace "should_route" of "wikis (plural, admin setup)" to "assert_routing...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 15 Dec 2011 01:48:26 +0000 (01:48 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 15 Dec 2011 01:48:26 +0000 (01:48 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8216 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing_test.rb

index c2b635123edf931f534f2fa1647d5af595d079e2..dfc821bf914b17192b7a40cb4164b6a2e4b769bd 100644 (file)
@@ -517,11 +517,19 @@ class RoutingTest < ActionController::IntegrationTest
     should_route :delete, "/projects/22/wiki/ladida", :controller => 'wiki', :action => 'destroy', :project_id => '22', :id => 'ladida'
   end
 
-  context "wikis (plural, admin setup)" do
-    should_route :get, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
-
-    should_route :post, "/projects/ladida/wiki", :controller => 'wikis', :action => 'edit', :id => 'ladida'
-    should_route :post, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida'
+  def test_wikis_plural_admin_setup
+    assert_routing(
+        { :method => 'get', :path => "/projects/ladida/wiki/destroy" },
+        { :controller => 'wikis', :action => 'destroy', :id => 'ladida' }
+      )
+    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
 
   def test_administration_panel