mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixup test for TimeWithZone Time.at precision
This test doesn't involve a DateTime, and can be shortened a bit.
This commit is contained in:
parent
a6636b0d1c
commit
9509bc23c2
1 changed files with 3 additions and 5 deletions
|
@ -1162,12 +1162,10 @@ class TimeWithZoneMethodsForTimeAndDateTimeTest < ActiveSupport::TestCase
|
||||||
assert_equal ActiveSupport::TimeZone["Alaska"], Time.zone
|
assert_equal ActiveSupport::TimeZone["Alaska"], Time.zone
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_end_of_period_timezone_equality_with_DateTime
|
def test_time_at_precision
|
||||||
Time.use_zone "UTC" do
|
Time.use_zone "UTC" do
|
||||||
without_time_zone = "2019-01-01 00:00:00Z".to_time.end_of_month
|
time = "2019-01-01 00:00:00Z".to_time.end_of_month
|
||||||
zoned = without_time_zone.in_time_zone
|
assert_equal Time.at(time), Time.at(time.in_time_zone)
|
||||||
|
|
||||||
assert_equal(Time.zone.at(without_time_zone), Time.zone.at(zoned))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue