Permalink
Browse files

Add test for TimeWithZone#to_i with wrapped DateTime

  • Loading branch information...
1 parent 2ae8300 commit a4b19277b2a4085da3bb0f1e05584496103eeb2a @gbuesing gbuesing committed Dec 15, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 activesupport/test/core_ext/time_with_zone_test.rb
@@ -284,6 +284,12 @@ def test_to_i
assert_equal 946684800, result
assert result.is_a?(Integer)
end
+
+ def test_to_i_with_wrapped_datetime
+ datetime = DateTime.civil(2000, 1, 1, 0)
+ twz = ActiveSupport::TimeWithZone.new(datetime, @time_zone)
+ assert_equal 946684800, twz.to_i
+ end
def test_to_time
assert_equal @twz, @twz.to_time

0 comments on commit a4b1927

Please sign in to comment.