@@ -196,13 +196,15 class Redmine::I18nTest < ActiveSupport::TestCase | |||
|
196 | 196 | |
|
197 | 197 | def test_languages_options |
|
198 | 198 | options = languages_options |
|
199 | ||
|
200 | 199 | assert options.is_a?(Array) |
|
201 | 200 | assert_equal valid_languages.size, options.size |
|
202 | 201 | assert_nil options.detect {|option| !option.is_a?(Array)} |
|
203 | 202 | assert_nil options.detect {|option| option.size != 2} |
|
204 | 203 | assert_nil options.detect {|option| !option.first.is_a?(String) || !option.last.is_a?(String)} |
|
205 | 204 | assert_include ["English", "en"], options |
|
205 | ja = "Japanese (\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e)" | |
|
206 | ja.force_encoding('UTF-8') if ja.respond_to?(:force_encoding) | |
|
207 | assert_include [ja, "ja"], options | |
|
206 | 208 | end |
|
207 | 209 | |
|
208 | 210 | def test_locales_validness |
General Comments 0
You need to be logged in to leave comments.
Login now