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
ginst-2009.11.24 vendor/rails/activerecord/test/cases/default_test_firebird.rb
ginst-2009.11.23 vendor/rails/activerecord/test/cases/default_test_firebird.rb
ginst-2.0.1 vendor/rails/activerecord/test/cases/default_test_firebird.rb
ginst-2.0.0 vendor/rails/activerecord/test/cases/default_test_firebird.rb
gemstreamer-1.2.0 spec/assets/testapp/vendor/rails/activerecord/test/cases/default_test_firebird.rb
gemstreamer-1.1.1 spec/assets/testapp/vendor/rails/activerecord/test/cases/default_test_firebird.rb
gemstreamer-1.1.0 spec/assets/testapp/vendor/rails/activerecord/test/cases/default_test_firebird.rb
gemstreamer-1.0.0 spec/assets/testapp/vendor/rails/activerecord/test/cases/default_test_firebird.rb
gemstreamer-0.0.0 spec/assets/testapp/vendor/rails/activerecord/test/cases/default_test_firebird.rb
radiant-rc-0.9.0 vendor/rails/activerecord/test/cases/default_test_firebird.rb
activerecord-2.2.3 test/cases/default_test_firebird.rb
webroar-0.2.2 src/admin_panel/vendor/rails/activerecord/test/cases/default_test_firebird.rb
radiant-0.8.1 vendor/rails/activerecord/test/cases/default_test_firebird.rb
activerecord-2.3.4 test/cases/default_test_firebird.rb
activerecord-2.3.3 test/cases/default_test_firebird.rb
activerecord-2.1.1 test/cases/default_test_firebird.rb
activerecord-2.3.2 test/cases/default_test_firebird.rb
activerecord-2.1.0 test/cases/default_test_firebird.rb
activerecord-2.1.2 test/cases/default_test_firebird.rb
activerecord-2.2.2 test/cases/default_test_firebird.rb