mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add missing nsec test for 17f5d8e
This commit is contained in:
parent
17f5d8e062
commit
a272d0cbe2
1 changed files with 5 additions and 0 deletions
|
@ -450,6 +450,11 @@ class TimeWithZoneTest < ActiveSupport::TestCase
|
|||
assert_equal 500000, twz.usec
|
||||
end
|
||||
|
||||
def test_nsec_returns_sec_fraction_when_datetime_is_wrapped
|
||||
twz = ActiveSupport::TimeWithZone.new(DateTime.civil(2000, 1, 1, 0, 0, Rational(1,2)), @time_zone)
|
||||
assert_equal 500000000, twz.nsec
|
||||
end
|
||||
|
||||
def test_utc_to_local_conversion_saves_period_in_instance_variable
|
||||
assert_nil @twz.instance_variable_get('@period')
|
||||
@twz.time
|
||||
|
|
Loading…
Reference in a new issue