Commits

Toshi MARUYAMA committed e65c924

test: route: split issues rest actions tests whether scoped under project or not

  • Participants
  • Parent commits 02b3f72

Comments (0)

Files changed (1)

File test/integration/routing/issues_test.rb

         { :controller => 'issues', :action => 'index', :format => 'xml' }
       )
     assert_routing(
+        { :method => 'get', :path => "/issues/64" },
+        { :controller => 'issues', :action => 'show', :id => '64' }
+      )
+    assert_routing(
+        { :method => 'get', :path => "/issues/64.pdf" },
+        { :controller => 'issues', :action => 'show', :id => '64',
+          :format => 'pdf' }
+      )
+    assert_routing(
+        { :method => 'get', :path => "/issues/64.atom" },
+        { :controller => 'issues', :action => 'show', :id => '64',
+          :format => 'atom' }
+      )
+    assert_routing(
+        { :method => 'get', :path => "/issues/64.xml" },
+        { :controller => 'issues', :action => 'show', :id => '64',
+          :format => 'xml' }
+      )
+  end
+
+  def test_issues_rest_actions_scoped_under_project
+    assert_routing(
         { :method => 'get', :path => "/projects/23/issues" },
         { :controller => 'issues', :action => 'index', :project_id => '23' }
       )
           :format => 'xml' }
       )
     assert_routing(
-        { :method => 'get', :path => "/issues/64" },
-        { :controller => 'issues', :action => 'show', :id => '64' }
-      )
-    assert_routing(
-        { :method => 'get', :path => "/issues/64.pdf" },
-        { :controller => 'issues', :action => 'show', :id => '64',
-          :format => 'pdf' }
-      )
-    assert_routing(
-        { :method => 'get', :path => "/issues/64.atom" },
-        { :controller => 'issues', :action => 'show', :id => '64',
-          :format => 'atom' }
-      )
-    assert_routing(
-        { :method => 'get', :path => "/issues/64.xml" },
-        { :controller => 'issues', :action => 'show', :id => '64',
-          :format => 'xml' }
-      )
-    assert_routing(
         { :method => 'get', :path => "/projects/23/issues/new" },
         { :controller => 'issues', :action => 'new', :project_id => '23' }
       )