Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: a8a60e9240
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.49 kB
require "cases/helper"
class SqlTypesTest < ActiveRecord::TestCase
def test_binary_types
assert_equal 'bytea', type_to_sql(:binary, 100_000)
assert_raise ActiveRecord::ActiveRecordError do
type_to_sql :binary, 4294967295
end
assert_equal 'text', type_to_sql(:text, 100_000)
assert_raise ActiveRecord::ActiveRecordError do
type_to_sql :text, 4294967295
end
end
def type_to_sql(*args)
ActiveRecord::Base.connection.type_to_sql(*args)
end
end
Jump to Line
Something went wrong with that request. Please try again.