aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/sqlite3
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-17 11:04:13 -0600
committerSean Griffin <sean@thoughtbot.com>2014-05-17 17:16:05 -0600
commit4bd5dffc85a4f3a660132eb85806a03fa5904e51 (patch)
treeb14a3eecebc85ce6f70a49ee54a466e10912010e /activerecord/test/cases/adapters/sqlite3
parent7359f8190d0ac97db077096796bdc582dffa90d8 (diff)
downloadrails-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.rb12
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