mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
9cb02c5317
Introducing the Firebird adapter. Closes #1874. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
16 lines
553 B
Ruby
16 lines
553 B
Ruby
require 'abstract_unit'
|
|
require 'fixtures/default'
|
|
|
|
class DefaultTest < Test::Unit::TestCase
|
|
def test_default_timestamp
|
|
default = Default.new
|
|
assert_instance_of(Time, default.default_timestamp)
|
|
assert_equal(:datetime, default.column_for_attribute(:default_timestamp).type)
|
|
|
|
# Variance should be small; increase if required -- e.g., if test db is on
|
|
# remote host and clocks aren't synchronized.
|
|
t1 = Time.new
|
|
accepted_variance = 1.0
|
|
assert_in_delta(t1.to_f, default.default_timestamp.to_f, accepted_variance)
|
|
end
|
|
end
|