diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2016-10-01 21:30:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 21:30:02 +0100 |
commit | 9ce2d1b1a43fc4ef3db59849b7412d30583a4074 (patch) | |
tree | d70ff8a043c9ed6938c925bc354b4dca8ff31060 /activesupport/test | |
parent | 53ede1aff2025d4391d0e05ba471fdaf3110a99c (diff) | |
parent | 607a6c7a9a6fb3d8bd7d08d0307018b626105d83 (diff) | |
download | rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.tar.gz rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.tar.bz2 rails-9ce2d1b1a43fc4ef3db59849b7412d30583a4074.zip |
Merge pull request #26677 from tbalthazar/26644
Fix `ActiveSupport::TimeWithZone#localtime`
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index e35aa6e154..5c940da1e3 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -54,6 +54,12 @@ class TimeWithZoneTest < ActiveSupport::TestCase assert_instance_of Time, @dt_twz.localtime end + def test_localtime_with_offset + assert_equal 0, @twz.localtime.gmt_offset + assert_equal (-3600), @twz.localtime(-3600).gmt_offset + assert_equal (-7200), @twz.localtime(-7200).gmt_offset + end + def test_utc? assert_equal false, @twz.utc? |