remove trailing white-spaces and code clean up init i18n test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5707 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ab768cecdd
commit
e68206852e
|
@ -1,5 +1,5 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2009 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -47,8 +47,10 @@ class Redmine::I18nTest < ActiveSupport::TestCase
|
|||
format_date(Date.today)
|
||||
format_time(Time.now)
|
||||
format_time(Time.now, false)
|
||||
assert_not_equal 'default', ::I18n.l(Date.today, :format => :default), "date.formats.default missing in #{lang}"
|
||||
assert_not_equal 'time', ::I18n.l(Time.now, :format => :time), "time.formats.time missing in #{lang}"
|
||||
assert_not_equal 'default', ::I18n.l(Date.today, :format => :default),
|
||||
"date.formats.default missing in #{lang}"
|
||||
assert_not_equal 'time', ::I18n.l(Time.now, :format => :time),
|
||||
"time.formats.time missing in #{lang}"
|
||||
end
|
||||
assert l('date.day_names').is_a?(Array)
|
||||
assert_equal 7, l('date.day_names').size
|
||||
|
@ -66,7 +68,6 @@ class Redmine::I18nTest < ActiveSupport::TestCase
|
|||
assert_equal '02/20/2011 15:45', format_time(now)
|
||||
assert_equal '15:45', format_time(now, false)
|
||||
end
|
||||
|
||||
with_settings :date_format => '%Y-%m-%d' do
|
||||
assert_equal '2011-02-20 15:45', format_time(now)
|
||||
assert_equal '15:45', format_time(now, false)
|
||||
|
@ -82,7 +83,6 @@ class Redmine::I18nTest < ActiveSupport::TestCase
|
|||
assert_equal '02/20/2011 03:45 pm', format_time(now)
|
||||
assert_equal '03:45 pm', format_time(now, false)
|
||||
end
|
||||
|
||||
with_settings :date_format => '%Y-%m-%d' do
|
||||
assert_equal '2011-02-20 03:45 pm', format_time(now)
|
||||
assert_equal '03:45 pm', format_time(now, false)
|
||||
|
@ -129,7 +129,6 @@ class Redmine::I18nTest < ActiveSupport::TestCase
|
|||
'zh-tw' => :"zh-TW",
|
||||
'zh-TW' => :"zh-TW",
|
||||
'zh-ZZ' => nil }
|
||||
|
||||
to_test.each {|lang, expected| assert_equal expected, find_language(lang)}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue