summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-23 06:12:44 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-23 06:12:44 +0000
commit1e7340b4483696486812e369e3e87cb30dc6b376 (patch)
tree4f994dda4ed38d37b76652f0321a1dfa3cb2ff33
parent08811bd259b042a7d7c8525704919c73f166b194 (diff)
downloadredmine-1e7340b4483696486812e369e3e87cb30dc6b376.tar.gz
redmine-1e7340b4483696486812e369e3e87cb30dc6b376.zip
Rails3: test: scm: filesystem: 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@8925 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/repositories_filesystem_controller_test.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb
index fceb27cf3..dc9b98041 100644
--- a/test/functional/repositories_filesystem_controller_test.rb
+++ b/test/functional/repositories_filesystem_controller_test.rb
@@ -68,7 +68,7 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
end
def test_show_no_extension
- get :entry, :id => PRJ_ID, :path => ['test']
+ get :entry, :id => PRJ_ID, :path => repository_path_hash(['test'])[:param]
assert_response :success
assert_template 'entry'
assert_tag :tag => 'th',
@@ -78,14 +78,16 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
end
def test_entry_download_no_extension
- get :entry, :id => PRJ_ID, :path => ['test'], :format => 'raw'
+ get :entry, :id => PRJ_ID, :path => repository_path_hash(['test'])[:param],
+ :format => 'raw'
assert_response :success
assert_equal 'application/octet-stream', @response.content_type
end
def test_show_non_ascii_contents
with_settings :repositories_encodings => 'UTF-8,EUC-JP' do
- get :entry, :id => PRJ_ID, :path => ['japanese', 'euc-jp.txt']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['japanese', 'euc-jp.txt'])[:param]
assert_response :success
assert_template 'entry'
assert_tag :tag => 'th',
@@ -109,7 +111,8 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
def test_show_utf16
with_settings :repositories_encodings => 'UTF-16' do
- get :entry, :id => PRJ_ID, :path => ['japanese', 'utf-16.txt']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['japanese', 'utf-16.txt'])[:param]
assert_response :success
assert_tag :tag => 'th',
:content => '2',
@@ -120,7 +123,8 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
def test_show_text_file_should_send_if_too_big
with_settings :file_max_size_displayed => 1 do
- get :entry, :id => PRJ_ID, :path => ['japanese', 'big-file.txt']
+ get :entry, :id => PRJ_ID,
+ :path => repository_path_hash(['japanese', 'big-file.txt'])[:param]
assert_response :success
assert_equal 'text/plain', @response.content_type
end