aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/number_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/number_helper_test.rb')
-rw-r--r--actionview/test/template/number_helper_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/test/template/number_helper_test.rb b/actionview/test/template/number_helper_test.rb
index b70b750869..631d45586b 100644
--- a/actionview/test/template/number_helper_test.rb
+++ b/actionview/test/template/number_helper_test.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
require "abstract_unit"
class NumberHelperTest < ActionView::TestCase
@@ -21,6 +22,7 @@ class NumberHelperTest < ActionView::TestCase
assert_equal "&lt;b&gt;1,234,567,890.50&lt;/b&gt; $", number_to_currency("1234567890.50", format: "<b>%n</b> %u")
assert_equal "&lt;b&gt;1,234,567,890.50&lt;/b&gt; $", number_to_currency("-1234567890.50", negative_format: "<b>%n</b> %u")
assert_equal "&lt;b&gt;1,234,567,890.50&lt;/b&gt; $", number_to_currency("-1234567890.50", 'negative_format' => "<b>%n</b> %u")
+ assert_equal '₹ 12,30,000.00', number_to_currency(1230000, delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/, unit: '₹', format: "%u %n")
end
def test_number_to_percentage