From c7d96d1441195ad36a83d1fe2de618f9d4fcf945 Mon Sep 17 00:00:00 2001
From: Toshi MARUYAMA <marutosijp2@yahoo.co.jp>
Date: Sat, 24 Dec 2011 04:12:25 +0000
Subject: [PATCH] test: route: move repositories test to new file

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8340 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
 test/integration/routing/repositories_test.rb | 126 ++++++++++++++++++
 test/integration/routing_test.rb              | 106 ---------------
 2 files changed, 126 insertions(+), 106 deletions(-)
 create mode 100644 test/integration/routing/repositories_test.rb

diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb
new file mode 100644
index 000000000..3de354b57
--- /dev/null
+++ b/test/integration/routing/repositories_test.rb
@@ -0,0 +1,126 @@
+# Redmine - project management software
+# Copyright (C) 2006-2011  Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+require File.expand_path('../../../test_helper', __FILE__)
+
+class RoutingRepositoriesTest < ActionController::IntegrationTest
+  def test_repositories
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository" },
+        { :controller => 'repositories', :action => 'show', :id => 'redmine' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/edit" },
+        { :controller => 'repositories', :action => 'edit', :id => 'redmine' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions" },
+        { :controller => 'repositories', :action => 'revisions', :id => 'redmine' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions.atom" },
+        { :controller => 'repositories', :action => 'revisions', :id => 'redmine',
+          :format => 'atom' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions/2457" },
+        { :controller => 'repositories', :action => 'revision', :id => 'redmine',
+          :rev => '2457' }
+      )
+    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/revisions/2457/diff.diff" },
+        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
+          :rev => '2457', :format => 'diff' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/diff/path/to/file.c" },
+        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
+          :path => %w[path to file.c] }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions/2/diff/path/to/file.c" },
+        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
+          :path => %w[path to file.c], :rev => '2' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/browse/path/to/file.c" },
+        { :controller => 'repositories', :action => 'browse', :id => 'redmine',
+          :path => %w[path to file.c] }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/entry/path/to/file.c" },
+        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
+          :path => %w[path to file.c] }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" },
+        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
+          :path => %w[path to file.c], :rev => '2' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/raw/path/to/file.c" },
+        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
+          :path => %w[path to file.c], :format => 'raw' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" },
+        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
+          :path => %w[path to file.c], :rev => '2', :format => 'raw' }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/annotate/path/to/file.c" },
+        { :controller => 'repositories', :action => 'annotate', :id => 'redmine',
+          :path => %w[path to file.c] }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/changes/path/to/file.c" },
+        { :controller => 'repositories', :action => 'changes', :id => 'redmine',
+          :path => %w[path to file.c] }
+      )
+    assert_routing(
+        { :method => 'get',
+          :path => "/projects/redmine/repository/statistics" },
+        { :controller => 'repositories', :action => 'stats', :id => 'redmine' }
+      )
+    assert_routing(
+        { :method => 'post',
+          :path => "/projects/redmine/repository/edit" },
+        { :controller => 'repositories', :action => 'edit', :id => 'redmine' }
+      )
+  end
+end
diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb
index 86e5e16fb..cd19989bb 100644
--- a/test/integration/routing_test.rb
+++ b/test/integration/routing_test.rb
@@ -465,112 +465,6 @@ class RoutingTest < ActionController::IntegrationTest
       )
   end
 
-  def test_repositories
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository" },
-        { :controller => 'repositories', :action => 'show', :id => 'redmine' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/edit" },
-        { :controller => 'repositories', :action => 'edit', :id => 'redmine' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions" },
-        { :controller => 'repositories', :action => 'revisions', :id => 'redmine' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions.atom" },
-        { :controller => 'repositories', :action => 'revisions', :id => 'redmine',
-          :format => 'atom' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions/2457" },
-        { :controller => 'repositories', :action => 'revision', :id => 'redmine',
-          :rev => '2457' }
-      )
-    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/revisions/2457/diff.diff" },
-        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
-          :rev => '2457', :format => 'diff' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/diff/path/to/file.c" },
-        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
-          :path => %w[path to file.c] }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions/2/diff/path/to/file.c" },
-        { :controller => 'repositories', :action => 'diff', :id => 'redmine',
-          :path => %w[path to file.c], :rev => '2' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/browse/path/to/file.c" },
-        { :controller => 'repositories', :action => 'browse', :id => 'redmine',
-          :path => %w[path to file.c] }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/entry/path/to/file.c" },
-        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
-          :path => %w[path to file.c] }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions/2/entry/path/to/file.c" },
-        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
-          :path => %w[path to file.c], :rev => '2' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/raw/path/to/file.c" },
-        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
-          :path => %w[path to file.c], :format => 'raw' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/revisions/2/raw/path/to/file.c" },
-        { :controller => 'repositories', :action => 'entry', :id => 'redmine',
-          :path => %w[path to file.c], :rev => '2', :format => 'raw' }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/annotate/path/to/file.c" },
-        { :controller => 'repositories', :action => 'annotate', :id => 'redmine',
-          :path => %w[path to file.c] }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/changes/path/to/file.c" },
-        { :controller => 'repositories', :action => 'changes', :id => 'redmine',
-          :path => %w[path to file.c] }
-      )
-    assert_routing(
-        { :method => 'get',
-          :path => "/projects/redmine/repository/statistics" },
-        { :controller => 'repositories', :action => 'stats', :id => 'redmine' }
-      )
-    assert_routing(
-        { :method => 'post',
-          :path => "/projects/redmine/repository/edit" },
-        { :controller => 'repositories', :action => 'edit', :id => 'redmine' }
-      )
-  end
-
   def test_roles
     assert_routing(
         { :method => 'get', :path => "/roles" },