summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_mercurial_controller_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-07 13:36:07 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-07 13:36:07 +0000
commit5c2c85a68a8f7f716b8a22cef0210a7074e09836 (patch)
treeecaf0d3221c27479965fb9d244c0ea50cd6ce26d /test/functional/repositories_mercurial_controller_test.rb
parentff6a86364e9923c88d5e9fad6f828962469365e4 (diff)
downloadredmine-5c2c85a68a8f7f716b8a22cef0210a7074e09836.tar.gz
redmine-5c2c85a68a8f7f716b8a22cef0210a7074e09836.zip
scm: mercurial: add test of showing non ASCII contents in functional test.
TODO: this test fails in Ruby 1.9 and Encoding.default_external is not UTF-8. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5690 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_mercurial_controller_test.rb')
-rw-r--r--test/functional/repositories_mercurial_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index 734dbee00..3d2111588 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -217,6 +217,22 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
end
end
+ def test_entry_show_latin_1_contents
+ with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
+ [27, '27', '7bbf4c738e71'].each do |r1|
+ get :entry, :id => PRJ_ID,
+ :path => ['latin-1-dir', "test-#{@char_1}.txt"], :rev => r1
+ assert_response :success
+ assert_template 'entry'
+ assert_tag :tag => 'th',
+ :content => '1',
+ :attributes => { :class => 'line-num' },
+ :sibling => { :tag => 'td',
+ :content => /test-#{@char_1}.txt/ }
+ end
+ end
+ end
+
def test_entry_download
get :entry, :id => PRJ_ID,
:path => ['sources', 'watchers_controller.rb'], :format => 'raw'