summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-02-27 16:27:52 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-02-27 16:27:52 +0000
commitc6ed9070e7ce76250a78d97f7069aeec6fc643e9 (patch)
tree1e72c8616bb7941de2bb35ba5bcaac30705610cc
parentcc900c0e070e5d9717d256b4d21275da430354e7 (diff)
downloadredmine-c6ed9070e7ce76250a78d97f7069aeec6fc643e9.tar.gz
redmine-c6ed9070e7ce76250a78d97f7069aeec6fc643e9.zip
scm: git: add test to browse non UTF-8 directory (#25846)
git-svn-id: http://svn.redmine.org/redmine/trunk@19534 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/functional/repositories_git_controller_test.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 0c8a5dfa5..a890ccdfe 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -233,6 +233,36 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
end
end
+ def test_browse_latin_1_dir
+ if @not_utf8_external
+ puts_pass_on_not_utf8
+ elsif WINDOWS_PASS
+ puts WINDOWS_SKIP_STR
+ else
+ assert_equal 0, @repository.changesets.count
+ @repository.fetch_changesets
+ @project.reload
+ assert_equal NUM_REV, @repository.changesets.count
+ get(
+ :show,
+ :params => {
+ :id => PRJ_ID,
+ :repository_id => @repository.id,
+ :path => repository_path_hash(['latin-1-dir', 'test-Ü-subdir'])[:param],
+ :rev => '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127'
+ }
+ )
+ assert_response :success
+
+ assert_select 'table.entries tbody' do
+ assert_select 'tr', 3
+ assert_select 'tr.file td.filename_no_report a', :text => 'test-Ü-1.txt'
+ assert_select 'tr.file td.filename_no_report a', :text => 'test-Ü-2.txt'
+ assert_select 'tr.file td.filename_no_report a', :text => 'test-Ü.txt'
+ end
+ end
+ end
+
def test_changes
get(
:changes,