diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2015-06-17 20:01:18 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2015-09-30 20:10:55 +0900 |
commit | 602ffe2a63a455bf4a8177552226db955b59e493 (patch) | |
tree | 4e81ab8e59c11a2c138e5053a7cf7b69a5c7c9ad /activesupport/test/core_ext | |
parent | 591a0bb87fff7583e01156696fbbf929d48d3e54 (diff) | |
download | rails-602ffe2a63a455bf4a8177552226db955b59e493.tar.gz rails-602ffe2a63a455bf4a8177552226db955b59e493.tar.bz2 rails-602ffe2a63a455bf4a8177552226db955b59e493.zip |
TimeWithZone#xmlschema should be able to display more than 6 digits
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index ccb7f02331..c40f0bacbf 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -110,14 +110,14 @@ class TimeWithZoneTest < ActiveSupport::TestCase @twz += 0.1234560001 # advance the time by a fraction of a second assert_equal "1999-12-31T19:00:00.123-05:00", @twz.xmlschema(3) assert_equal "1999-12-31T19:00:00.123456-05:00", @twz.xmlschema(6) - assert_equal "1999-12-31T19:00:00.123456-05:00", @twz.xmlschema(12) + assert_equal "1999-12-31T19:00:00.123456000100-05:00", @twz.xmlschema(12) end def test_xmlschema_with_fractional_seconds_lower_than_hundred_thousand @twz += 0.001234 # advance the time by a fraction assert_equal "1999-12-31T19:00:00.001-05:00", @twz.xmlschema(3) assert_equal "1999-12-31T19:00:00.001234-05:00", @twz.xmlschema(6) - assert_equal "1999-12-31T19:00:00.001234-05:00", @twz.xmlschema(12) + assert_equal "1999-12-31T19:00:00.001234000000-05:00", @twz.xmlschema(12) end def test_xmlschema_with_nil_fractional_seconds |