summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_cvs_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-23 07:33:44 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-23 07:33:44 +0000
commit00ec4e189fb1bf4c77df7fbe9584e6058521ebd1 (patch)
treeab5b5f848b7d164fa4fd913e1f8d465312b567ec /test/functional/repositories_cvs_controller_test.rb
parent1e7340b4483696486812e369e3e87cb30dc6b376 (diff)
downloadredmine-00ec4e189fb1bf4c77df7fbe9584e6058521ebd1.tar.gz
redmine-00ec4e189fb1bf4c77df7fbe9584e6058521ebd1.zip
Rails3: test: scm: cvs: use "repository_path_hash" for path param
Rails3 new route format returns path param as string not array. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8926 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_cvs_controller_test.rb')
-rw-r--r--test/functional/repositories_cvs_controller_test.rb24
1 files changed, 16 insertions, 8 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb
index 2ad9b856a..35cb86a0e 100644
--- a/test/functional/repositories_cvs_controller_test.rb
+++ b/test/functional/repositories_cvs_controller_test.rb
@@ -79,7 +79,7 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :show, :id => PRJ_ID, :path => ['images']
+ get :show, :id => PRJ_ID, :path => repository_path_hash(['images'])[:param]
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entries)
@@ -95,7 +95,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :show, :id => PRJ_ID, :path => ['images'], :rev => 1
+ get :show, :id => PRJ_ID, :path => repository_path_hash(['images'])[:param],
+ :rev => 1
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entries)
@@ -107,7 +108,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
assert_response :success
assert_template 'entry'
assert_no_tag :tag => 'td',
@@ -121,7 +123,9 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'], :rev => 2
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
+ :rev => 2
assert_response :success
assert_template 'entry'
# this line was removed in r3
@@ -135,7 +139,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['sources', 'zzz.c'])[:param]
assert_tag :tag => 'p',
:attributes => { :id => /errorExplanation/ },
:content => /The entry or revision was not found in the repository/
@@ -146,7 +151,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'],
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
:format => 'raw'
assert_response :success
end
@@ -156,7 +162,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :entry, :id => PRJ_ID, :path => ['sources']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['sources'])[:param]
assert_response :success
assert_template 'show'
assert_not_nil assigns(:entry)
@@ -206,7 +213,8 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
+ get :annotate, :id => PRJ_ID,
+ :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
assert_response :success
assert_template 'annotate'
# 1.1 line