mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #22824 from maclover7/add-numericwithformat-tests
Add test coverage for ActiveSupport::NumericWithFormat#to_formatted_s
This commit is contained in:
commit
468df261f8
1 changed files with 6 additions and 0 deletions
|
@ -400,6 +400,12 @@ class NumericExtFormattingTest < ActiveSupport::TestCase
|
||||||
assert_equal '1 Million', BigDecimal("1000010").to_s(:human)
|
assert_equal '1 Million', BigDecimal("1000010").to_s(:human)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_to_formatted_s_is_deprecated
|
||||||
|
assert_deprecated do
|
||||||
|
5551234.to_formatted_s(:phone)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_in_milliseconds
|
def test_in_milliseconds
|
||||||
assert_equal 10_000, 10.seconds.in_milliseconds
|
assert_equal 10_000, 10.seconds.in_milliseconds
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue