Sha256: dc7e561b5b8c38765bf3581927fbfee8edc1c16e3de1258f966cb32805c16616

Contents?: true

Size: 552 Bytes

Versions: 105

Compression:

Stored size: 552 Bytes

Contents

require "cases/helper"
require 'models/default'

class DefaultTest < ActiveRecord::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

Version data entries

105 entries across 102 versions & 21 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activerecord/test/cases/default_test_firebird.rb
masover-castronaut-0.4.4.4 vendor/activerecord/test/cases/default_test_firebird.rb
masover-castronaut-0.4.4.5 vendor/activerecord/test/cases/default_test_firebird.rb
masover-castronaut-0.5.0.1 vendor/activerecord/test/cases/default_test_firebird.rb
p8-castronaut-0.6.1.1 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.1 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.2 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.3 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.4 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.5 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.4.6 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.5.0 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.5.1 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.5.2 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.5.3 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.5.4 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.6.0 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.6.1 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.7.4 vendor/activerecord/test/cases/default_test_firebird.rb
relevance-castronaut-0.7.5 vendor/activerecord/test/cases/default_test_firebird.rb