diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-17 11:04:13 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-17 17:16:05 -0600 |
commit | 4bd5dffc85a4f3a660132eb85806a03fa5904e51 (patch) | |
tree | b14a3eecebc85ce6f70a49ee54a466e10912010e /activerecord/test/cases/adapters/sqlite3 | |
parent | 7359f8190d0ac97db077096796bdc582dffa90d8 (diff) | |
download | rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.gz rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.bz2 rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.zip |
Add a type object to Column constructor
Part of #15134. In order to perform typecasting polymorphically, we need
to add another argument to the constructor. The order was chosen to
match the `oid_type` on `PostgreSQLColumn`.
Diffstat (limited to 'activerecord/test/cases/adapters/sqlite3')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/quoting_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb index e4b69fdf7b..63170e710e 100644 --- a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb @@ -47,13 +47,13 @@ module ActiveRecord end def test_type_cast_true - c = Column.new(nil, 1, 'int') + c = Column.new(nil, 1, Type::Value.new, 'int') assert_equal 't', @conn.type_cast(true, nil) assert_equal 1, @conn.type_cast(true, c) end def test_type_cast_false - c = Column.new(nil, 1, 'int') + c = Column.new(nil, 1, Type::Value.new, 'int') assert_equal 'f', @conn.type_cast(false, nil) assert_equal 0, @conn.type_cast(false, c) end @@ -61,16 +61,16 @@ module ActiveRecord def test_type_cast_string assert_equal '10', @conn.type_cast('10', nil) - c = Column.new(nil, 1, 'int') + c = Column.new(nil, 1, Type::Value.new, 'int') assert_equal 10, @conn.type_cast('10', c) - c = Column.new(nil, 1, 'float') + c = Column.new(nil, 1, Type::Value.new, 'float') assert_equal 10.1, @conn.type_cast('10.1', c) - c = Column.new(nil, 1, 'binary') + c = Column.new(nil, 1, Type::Value.new, 'binary') assert_equal '10.1', @conn.type_cast('10.1', c) - c = Column.new(nil, 1, 'date') + c = Column.new(nil, 1, Type::Value.new, 'date') assert_equal '10.1', @conn.type_cast('10.1', c) end |