Sha256: 6c8cbe97a520b94b6335798dea9c56f74b7fa92651667baf67bdca8ca17d346b

Contents?: true

Size: 419 Bytes

Versions: 8

Compression:

Stored size: 419 Bytes

Contents

require "cases/helper"

class Mysql2SqlTypesTest < ActiveRecord::Mysql2TestCase
  def test_binary_types
    assert_equal 'varbinary(64)', type_to_sql(:binary, 64)
    assert_equal 'varbinary(4095)', type_to_sql(:binary, 4095)
    assert_equal 'blob', type_to_sql(:binary, 4096)
    assert_equal 'blob', type_to_sql(:binary)
  end

  def type_to_sql(*args)
    ActiveRecord::Base.connection.type_to_sql(*args)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-5.1.0 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-5.0.5 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-5.0.4 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-5.0.3 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-5.0.2 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-4.0.0-x86-mingw32 test/cases/adapters/mysql2/sql_types_test.rb
ibm_db-4.0.0 test/cases/adapters/mysql2/sql_types_test.rb