diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_date_time.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/psych/test_date_time.rb b/test/psych/test_date_time.rb index 443669d..7745eb4 100644 --- a/test/psych/test_date_time.rb +++ b/test/psych/test_date_time.rb @@ -9,10 +9,25 @@ module Psych assert_cycle time end + def test_usec + time = Time.utc(2017, 4, 13, 12, 0, 0, 5) + assert_cycle time + end + + def test_non_utc + time = Time.new(2017, 4, 13, 12, 0, 0.5, "+09:00") + assert_cycle time + end + def test_new_datetime assert_cycle DateTime.new end + def test_datetime_non_utc + dt = DateTime.new(2017, 4, 13, 12, 0, 0.5, "+09:00") + assert_cycle dt + end + def test_invalid_date assert_cycle "2013-10-31T10:40:07-000000000000033" end |