Sha256: e04151e94a9ca0c11b390c04dd2bfa085588a9051c19d5486e2aace713b3f9e6

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

require 'jdbc_common'

class BooleanSchema < ActiveRecord::Migration
  def self.up
    create_table :booleans do |t|
      t.boolean :value, :default => false, :null => false
    end
  end

  def self.down
    drop_table :booleans
  end
end

class Boolean < ActiveRecord::Base
end

class PostgresTypeConversionTest < Test::Unit::TestCase
  def setup
    BooleanSchema.up
  end

  def teardown
    BooleanSchema.down
  end

  def test_should_handle_bool_conversion_with_boolean_relation
    assert_nothing_raised do
      ActiveRecord::Base.connection.raw_connection.set_native_database_types
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-1.2.5 test/postgres_type_conversion_test.rb