@@ -196,13 +196,15 class Redmine::I18nTest < ActiveSupport::TestCase | |||||
196 |
|
196 | |||
197 | def test_languages_options |
|
197 | def test_languages_options | |
198 | options = languages_options |
|
198 | options = languages_options | |
199 |
|
||||
200 | assert options.is_a?(Array) |
|
199 | assert options.is_a?(Array) | |
201 | assert_equal valid_languages.size, options.size |
|
200 | assert_equal valid_languages.size, options.size | |
202 | assert_nil options.detect {|option| !option.is_a?(Array)} |
|
201 | assert_nil options.detect {|option| !option.is_a?(Array)} | |
203 | assert_nil options.detect {|option| option.size != 2} |
|
202 | assert_nil options.detect {|option| option.size != 2} | |
204 | assert_nil options.detect {|option| !option.first.is_a?(String) || !option.last.is_a?(String)} |
|
203 | assert_nil options.detect {|option| !option.first.is_a?(String) || !option.last.is_a?(String)} | |
205 | assert_include ["English", "en"], options |
|
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 | end |
|
208 | end | |
207 |
|
209 | |||
208 | def test_locales_validness |
|
210 | def test_locales_validness |
General Comments 0
You need to be logged in to leave comments.
Login now