summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-12 22:00:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-12 22:00:29 +0000
commitd82738ad00af8c2473e8c772346accfff4aeb9fd (patch)
tree323cd46958f1ff5de6b240f8c1b25442a7eb45a7 /test
parentcd110535a35a35c68c8581fa5c0486fbf0eebae1 (diff)
downloadredmine-d82738ad00af8c2473e8c772346accfff4aeb9fd.tar.gz
redmine-d82738ad00af8c2473e8c772346accfff4aeb9fd.zip
Add test for i18n number_to_human_size (#4208).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3034 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/i18n_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb
index 35401f1c2..666bd7481 100644
--- a/test/unit/lib/redmine/i18n_test.rb
+++ b/test/unit/lib/redmine/i18n_test.rb
@@ -19,6 +19,7 @@ require File.dirname(__FILE__) + '/../../../test_helper'
class Redmine::I18nTest < ActiveSupport::TestCase
include Redmine::I18n
+ include ActionView::Helpers::NumberHelper
def setup
@hook_module = Redmine::Hook
@@ -84,6 +85,15 @@ class Redmine::I18nTest < ActiveSupport::TestCase
assert_equal Time.now.strftime('%H %M'), format_time(now, false)
end
+ def test_number_to_human_size_for_each_language
+ valid_languages.each do |lang|
+ set_language_if_valid lang
+ assert_nothing_raised "#{lang} failure" do
+ number_to_human_size(1024*1024*4)
+ end
+ end
+ end
+
def test_valid_languages
assert valid_languages.is_a?(Array)
assert valid_languages.first.is_a?(Symbol)