1. Unofficial Redmine Clones
  2. Untitled project
  3. redmine

Commits

Toshi MARUYAMA  committed 213e370

test: route: scm: move changes action tests to non revisions path tests

  • Participants
  • Parent commits 894fd9a
  • Branches default

Comments (0)

Files changed (1)

File test/integration/routing/repositories_test.rb

View file
       )
     assert_routing(
         { :method => 'get',
-          :path => "/projects/redmine/repository/changes" },
-        { :controller => 'repositories', :action => 'changes', :id => 'redmine' }
-      )
-    ['2457', 'master', 'slash/slash'].each do |rev|
-      assert_routing(
-           { :method => 'get',
-             :path => "/projects/redmine/repository/changes" },
-           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
-             :rev => rev },
-           {},
-           { :rev => rev }
-         )
-    end
-    ['2457', 'master', 'slash/slash'].each do |rev|
-      assert_routing(
-           { :method => 'get',
-             :path => "/projects/redmine/repository/changes/#{@path_hash[:path]}" },
-           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
-             :path => @path_hash[:param], :rev => rev },
-           {},
-           { :rev => rev }
-         )
-    end
-    assert_routing(
-        { :method => 'get',
           :path => "/projects/redmine/repository/revisions/2457/diff" },
         { :controller => 'repositories', :action => 'diff', :id => 'redmine',
           :rev => '2457' }
       )
     assert_routing(
         { :method => 'get',
-          :path => "/projects/redmine/repository/foo/changes" },
-        { :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo' }
-      )
-    ['2457', 'master', 'slash/slash'].each do |rev|
-      assert_routing(
-           { :method => 'get',
-             :path => "/projects/redmine/repository/foo/changes" },
-           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
-             :repository_id => 'foo', :rev => rev },
-           {},
-           { :rev => rev }
-         )
-    end
-    ['2457', 'master', 'slash/slash'].each do |rev|
-      assert_routing(
-           { :method => 'get',
-             :path => "/projects/redmine/repository/foo/changes/#{@path_hash[:path]}" },
-           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
-             :repository_id => 'foo', :path => @path_hash[:param], :rev => rev },
-           {},
-           { :rev => rev }
-         )
-    end
-    assert_routing(
-        { :method => 'get',
           :path => "/projects/redmine/repository/foo/revisions/2457/diff" },
         { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
           :rev => '2457' }
   def test_repositories_non_revisions_path
     assert_routing(
         { :method => 'get',
+          :path => "/projects/redmine/repository/changes" },
+        { :controller => 'repositories', :action => 'changes', :id => 'redmine' }
+      )
+    ['2457', 'master', 'slash/slash'].each do |rev|
+      assert_routing(
+           { :method => 'get',
+             :path => "/projects/redmine/repository/changes" },
+           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
+             :rev => rev },
+           {},
+           { :rev => rev }
+         )
+    end
+    ['2457', 'master', 'slash/slash'].each do |rev|
+      assert_routing(
+           { :method => 'get',
+             :path => "/projects/redmine/repository/changes/#{@path_hash[:path]}" },
+           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
+             :path => @path_hash[:param], :rev => rev },
+           {},
+           { :rev => rev }
+         )
+    end
+    assert_routing(
+        { :method => 'get',
           :path => "/projects/redmine/repository/diff/#{@path_hash[:path]}" },
         { :controller => 'repositories', :action => 'diff', :id => 'redmine',
           :path => @path_hash[:param] }
   def test_repositories_non_revisions_path_with_repository_id
     assert_routing(
         { :method => 'get',
+          :path => "/projects/redmine/repository/foo/changes" },
+        { :controller => 'repositories', :action => 'changes',
+          :id => 'redmine', :repository_id => 'foo' }
+      )
+    ['2457', 'master', 'slash/slash'].each do |rev|
+      assert_routing(
+           { :method => 'get',
+             :path => "/projects/redmine/repository/foo/changes" },
+           { :controller => 'repositories', :action => 'changes',
+             :id => 'redmine',
+             :repository_id => 'foo', :rev => rev },
+           {},
+           { :rev => rev }
+         )
+    end
+    ['2457', 'master', 'slash/slash'].each do |rev|
+      assert_routing(
+           { :method => 'get',
+             :path => "/projects/redmine/repository/foo/changes/#{@path_hash[:path]}" },
+           { :controller => 'repositories', :action => 'changes', :id => 'redmine',
+             :repository_id => 'foo', :path => @path_hash[:param], :rev => rev },
+           {},
+           { :rev => rev }
+         )
+    end
+    assert_routing(
+        { :method => 'get',
           :path => "/projects/redmine/repository/foo/diff/#{@path_hash[:path]}" },
         { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
           :path => @path_hash[:param] }