aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/number_helper_i18n_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/number_helper_i18n_test.rb')
-rw-r--r--actionpack/test/template/number_helper_i18n_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/template/number_helper_i18n_test.rb b/actionpack/test/template/number_helper_i18n_test.rb
index 67c61a5f2e..2528bead36 100644
--- a/actionpack/test/template/number_helper_i18n_test.rb
+++ b/actionpack/test/template/number_helper_i18n_test.rb
@@ -10,6 +10,7 @@ class NumberHelperI18nTests < Test::Unit::TestCase
@number_defaults = { :precision => 3, :delimiter => ',', :separator => '.' }
@currency_defaults = { :unit => '$', :format => '%u%n', :precision => 2 }
@human_defaults = { :precision => 1 }
+ @human_storage_units_defaults = %w(Bytes KB MB GB TB)
@percentage_defaults = { :delimiter => '' }
@precision_defaults = { :delimiter => '' }
@@ -47,6 +48,8 @@ class NumberHelperI18nTests < Test::Unit::TestCase
I18n.expects(:translate).with(:'number.format', :locale => 'en', :raise => true).returns(@number_defaults)
I18n.expects(:translate).with(:'number.human.format', :locale => 'en',
:raise => true).returns(@human_defaults)
+ I18n.expects(:translate).with(:'number.human.storage_units', :locale => 'en',
+ :raise => true).returns(@human_storage_units_defaults)
# can't be called with 1 because this directly returns without calling I18n.translate
number_to_human_size(1025, :locale => 'en')
end