summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-03 17:48:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-03 17:48:18 +0000
commit610a92c4d1e8b69c4f5671e5cb7c8b0cfd6ff080 (patch)
treed3e88bb83a585f5c44c460ae18fa601495eae98b /test
parent3d562490d8e11a53d1434572bebc87167dbeccfb (diff)
downloadredmine-610a92c4d1e8b69c4f5671e5cb7c8b0cfd6ff080.tar.gz
redmine-610a92c4d1e8b69c4f5671e5cb7c8b0cfd6ff080.zip
Moved test from ApplicationControllerTest.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8485 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/application_controller_test.rb10
-rw-r--r--test/unit/lib/redmine/i18n_test.rb9
2 files changed, 9 insertions, 10 deletions
diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb
index 11f3bed1e..6fedebf30 100644
--- a/test/functional/application_controller_test.rb
+++ b/test/functional/application_controller_test.rb
@@ -27,16 +27,6 @@ class ApplicationControllerTest < ActionController::TestCase
@response = ActionController::TestResponse.new
end
- # check that all language files are valid
- def test_localization
- lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size
- assert_equal lang_files_count, valid_languages.size
- valid_languages.each do |lang|
- assert set_language_if_valid(lang)
- end
- set_language_if_valid('en')
- end
-
def test_call_hook_mixed_in
assert @controller.respond_to?(:call_hook)
end
diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb
index ff814f6a3..01c32b5d2 100644
--- a/test/unit/lib/redmine/i18n_test.rb
+++ b/test/unit/lib/redmine/i18n_test.rb
@@ -122,6 +122,15 @@ class Redmine::I18nTest < ActiveSupport::TestCase
assert valid_languages.first.is_a?(Symbol)
end
+ def test_locales_validness
+ lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size
+ assert_equal lang_files_count, valid_languages.size
+ valid_languages.each do |lang|
+ assert set_language_if_valid(lang)
+ end
+ set_language_if_valid('en')
+ end
+
def test_valid_language
to_test = {'fr' => :fr,
'Fr' => :fr,