Sha256: bae88633210816839260d5979b928e675d5cd6e241008d7d1e840febf13f6003

Contents?: true

Size: 635 Bytes

Versions: 6

Compression:

Stored size: 635 Bytes

Contents

require "cases/helper"
require "active_support/core_ext/numeric/bytes"

class PostgresqlIntegerTest < ActiveRecord::PostgreSQLTestCase
  class PgInteger < ActiveRecord::Base
  end

  def setup
    @connection = ActiveRecord::Base.connection

    @connection.transaction do
      @connection.create_table "pg_integers", force: true do |t|
        t.integer :quota, limit: 8, default: 2.gigabytes
      end
    end
  end

  teardown do
    @connection.drop_table "pg_integers", if_exists: true
  end

  test "schema properly respects bigint ranges" do
    assert_equal 2.gigabytes, PgInteger.new.quota
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ibm_db-5.2.0-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb
ibm_db-5.1.0-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb
ibm_db-5.0.5-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb
ibm_db-5.0.4-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb
ibm_db-5.0.3-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb
ibm_db-5.0.2-x86-mingw32 test/cases/adapters/postgresql/integer_test.rb