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
This commit is contained in:
parent
31590e307a
commit
1e5fa50a80
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue