mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
66ebbc4952
commit
faed011acc
2 changed files with 3 additions and 3 deletions
|
@ -80,14 +80,14 @@ class SQLite3QuotingTest < ActiveRecord::SQLite3TestCase
|
||||||
|
|
||||||
def test_quoting_binary_strings
|
def test_quoting_binary_strings
|
||||||
value = "hello".encode('ascii-8bit')
|
value = "hello".encode('ascii-8bit')
|
||||||
type = Type::String.new
|
type = ActiveRecord::Type::String.new
|
||||||
|
|
||||||
assert_equal "'hello'", @conn.quote(type.serialize(value))
|
assert_equal "'hello'", @conn.quote(type.serialize(value))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_quoted_time_returns_date_qualified_time
|
def test_quoted_time_returns_date_qualified_time
|
||||||
value = ::Time.utc(2000, 1, 1, 12, 30, 0, 999999)
|
value = ::Time.utc(2000, 1, 1, 12, 30, 0, 999999)
|
||||||
type = Type::Time.new
|
type = ActiveRecord::Type::Time.new
|
||||||
|
|
||||||
assert_equal "'2000-01-01 12:30:00.999999'", @conn.quote(type.serialize(value))
|
assert_equal "'2000-01-01 12:30:00.999999'", @conn.quote(type.serialize(value))
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,7 @@ class SQLite3StatementPoolTest < ActiveRecord::SQLite3TestCase
|
||||||
if Process.respond_to?(:fork)
|
if Process.respond_to?(:fork)
|
||||||
def test_cache_is_per_pid
|
def test_cache_is_per_pid
|
||||||
|
|
||||||
cache = StatementPool.new(10)
|
cache = ActiveRecord::ConnectionAdapters::SQLite3Adapter::StatementPool.new(10)
|
||||||
cache['foo'] = 'bar'
|
cache['foo'] = 'bar'
|
||||||
assert_equal 'bar', cache['foo']
|
assert_equal 'bar', cache['foo']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue