Toshi MARUYAMA avatar Toshi MARUYAMA committed 2bd64e7

test: route: rearrange issues tests for each scopes

Comments (0)

Files changed (1)

test/integration/routing/issues_test.rb

         { :controller => 'issues', :action => 'show', :id => '64',
           :format => 'xml' }
       )
+    assert_routing(
+        { :method => 'post', :path => "/issues.xml" },
+        { :controller => 'issues', :action => 'create', :format => 'xml' }
+      )
+    assert_routing(
+        { :method => 'get', :path => "/issues/64/edit" },
+        { :controller => 'issues', :action => 'edit', :id => '64' }
+      )
+    assert_routing(
+        { :method => 'put', :path => "/issues/1.xml" },
+        { :controller => 'issues', :action => 'update', :id => '1',
+          :format => 'xml' }
+      )
+    assert_routing(
+        { :method => 'delete', :path => "/issues/1.xml" },
+        { :controller => 'issues', :action => 'destroy', :id => '1',
+          :format => 'xml' }
+      )
   end
 
   def test_issues_rest_actions_scoped_under_project
           :format => 'xml' }
       )
     assert_routing(
+        { :method => 'post', :path => "/projects/23/issues" },
+        { :controller => 'issues', :action => 'create', :project_id => '23' }
+      )
+    assert_routing(
         { :method => 'get', :path => "/projects/23/issues/new" },
         { :controller => 'issues', :action => 'new', :project_id => '23' }
       )
         { :method => 'post', :path => "/projects/23/issues/new" },
         { :controller => 'issues', :action => 'new', :project_id => '23' }
       )
-    assert_routing(
-        { :method => 'post', :path => "/projects/23/issues" },
-        { :controller => 'issues', :action => 'create', :project_id => '23' }
-      )
-    assert_routing(
-        { :method => 'post', :path => "/issues.xml" },
-        { :controller => 'issues', :action => 'create', :format => 'xml' }
-      )
-    assert_routing(
-        { :method => 'get', :path => "/issues/64/edit" },
-        { :controller => 'issues', :action => 'edit', :id => '64' }
-      )
-    assert_routing(
-        { :method => 'put', :path => "/issues/1.xml" },
-        { :controller => 'issues', :action => 'update', :id => '1',
-          :format => 'xml' }
-      )
-    assert_routing(
-        { :method => 'delete', :path => "/issues/1.xml" },
-        { :controller => 'issues', :action => 'destroy', :id => '1',
-          :format => 'xml' }
-      )
   end
 
   def test_issues_extra_actions
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.