2 require 'models/default'
4 class DefaultTest
< ActiveRecord
::TestCase
5 def test_default_timestamp
7 assert_instance_of(Time
, default
.default_timestamp
)
8 assert_equal(:datetime, default
.column_for_attribute(:default_timestamp).type
)
10 # Variance should be small; increase if required -- e.g., if test db is on
11 # remote host and clocks aren't synchronized.
13 accepted_variance
= 1.0
14 assert_in_delta(t1
.to_f
, default
.default_timestamp
.to_f
, accepted_variance
)