Sha256: 71643a88443b73784cbd1fc9557991f307bdcf701e54609a85c4cd7e33522301
Contents?: true
Size: 675 Bytes
Versions: 2
Compression:
Stored size: 675 Bytes
Contents
require 'java' require 'models/data_types' require 'db/derby' require 'test/unit' JInteger = java.lang.Integer class TypeConversionTest < Test::Unit::TestCase def setup DbTypeMigration.up DbType.create( :sample_timestamp => Time.at(1169964202), :sample_decimal => JInteger::MAX_VALUE + 1) end def teardown DbTypeMigration.down end def test_timestamp types = DbType.find(:first) assert_equal 'Sun Jan 28 06:03:22 UTC 2007', types.sample_timestamp.getutc.to_s end def test_decimal types = DbType.find(:first) assert_equal((JInteger::MAX_VALUE + 1), types.sample_decimal) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ActiveRecord-JDBC-0.2.3 | test/activerecord/connection_adapters/type_conversion_test.rb |
ActiveRecord-JDBC-0.2.4 | test/activerecord/connection_adapters/type_conversion_test.rb |