@@ -27,16 +27,6 class ApplicationControllerTest < ActionController::TestCase | |||||
27 | @response = ActionController::TestResponse.new |
|
27 | @response = ActionController::TestResponse.new | |
28 | end |
|
28 | end | |
29 |
|
29 | |||
30 | # check that all language files are valid |
|
|||
31 | def test_localization |
|
|||
32 | lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size |
|
|||
33 | assert_equal lang_files_count, valid_languages.size |
|
|||
34 | valid_languages.each do |lang| |
|
|||
35 | assert set_language_if_valid(lang) |
|
|||
36 | end |
|
|||
37 | set_language_if_valid('en') |
|
|||
38 | end |
|
|||
39 |
|
||||
40 | def test_call_hook_mixed_in |
|
30 | def test_call_hook_mixed_in | |
41 | assert @controller.respond_to?(:call_hook) |
|
31 | assert @controller.respond_to?(:call_hook) | |
42 | end |
|
32 | end |
@@ -122,6 +122,15 class Redmine::I18nTest < ActiveSupport::TestCase | |||||
122 | assert valid_languages.first.is_a?(Symbol) |
|
122 | assert valid_languages.first.is_a?(Symbol) | |
123 | end |
|
123 | end | |
124 |
|
124 | |||
|
125 | def test_locales_validness | |||
|
126 | lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size | |||
|
127 | assert_equal lang_files_count, valid_languages.size | |||
|
128 | valid_languages.each do |lang| | |||
|
129 | assert set_language_if_valid(lang) | |||
|
130 | end | |||
|
131 | set_language_if_valid('en') | |||
|
132 | end | |||
|
133 | ||||
125 | def test_valid_language |
|
134 | def test_valid_language | |
126 | to_test = {'fr' => :fr, |
|
135 | to_test = {'fr' => :fr, | |
127 | 'Fr' => :fr, |
|
136 | 'Fr' => :fr, |
General Comments 0
You need to be logged in to leave comments.
Login now