diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-03-21 22:54:59 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-03-21 22:54:59 +0000 |
commit | 1e5fa50a8096bdebd0413d24f10d18d291d56dde (patch) | |
tree | 2a6cb9c1273db0ac77dde0af4ee104fa8b08aaea | |
parent | 31590e307a39520c6bb81879a8c7b919e65a98ae (diff) | |
download | redmine-1e5fa50a8096bdebd0413d24f10d18d291d56dde.tar.gz redmine-1e5fa50a8096bdebd0413d24f10d18d291d56dde.zip |
add test to ensure language name is UTF-8 (#12475)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11673 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/unit/lib/redmine/i18n_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb index 28108874a..3602e62ad 100644 --- a/test/unit/lib/redmine/i18n_test.rb +++ b/test/unit/lib/redmine/i18n_test.rb @@ -196,13 +196,15 @@ class Redmine::I18nTest < ActiveSupport::TestCase def test_languages_options options = languages_options - assert options.is_a?(Array) assert_equal valid_languages.size, options.size assert_nil options.detect {|option| !option.is_a?(Array)} assert_nil options.detect {|option| option.size != 2} assert_nil options.detect {|option| !option.first.is_a?(String) || !option.last.is_a?(String)} assert_include ["English", "en"], options + ja = "Japanese (\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e)" + ja.force_encoding('UTF-8') if ja.respond_to?(:force_encoding) + assert_include [ja, "ja"], options end def test_locales_validness |