mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 13:55:52 +01:00
Moved test from ApplicationControllerTest.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8485 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -27,16 +27,6 @@ class ApplicationControllerTest < ActionController::TestCase
|
|||||||
@response = ActionController::TestResponse.new
|
@response = ActionController::TestResponse.new
|
||||||
end
|
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
|
def test_call_hook_mixed_in
|
||||||
assert @controller.respond_to?(:call_hook)
|
assert @controller.respond_to?(:call_hook)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -122,6 +122,15 @@ class Redmine::I18nTest < ActiveSupport::TestCase
|
|||||||
assert valid_languages.first.is_a?(Symbol)
|
assert valid_languages.first.is_a?(Symbol)
|
||||||
end
|
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
|
def test_valid_language
|
||||||
to_test = {'fr' => :fr,
|
to_test = {'fr' => :fr,
|
||||||
'Fr' => :fr,
|
'Fr' => :fr,
|
||||||
|
|||||||
Reference in New Issue
Block a user