提交 5f631d63 编写于 作者: B Ben Cherry

Test that PostgreSQL adapter includes `usec` when quoting `DateTime`

上级 1cb50949
* Test that PostgreSQL adapter includes `usec` when quoting `DateTime` objects
*Ben Cherry*
* Fix PredicateBuilder so polymorhic association keys in `where` clause can
also accept not only `ActiveRecord::Base` direct descendances (decorated
models, for example).
......
......@@ -52,6 +52,11 @@ def test_quote_cast_numeric
c = Column.new(nil, nil, 'text')
assert_equal "'666'", @conn.quote(fixnum, c)
end
def test_quote_time_usec
assert_equal "'1970-01-01 00:00:00.000000'", @conn.quote(Time.at(0))
assert_equal "'1970-01-01 00:00:00.000000'", @conn.quote(Time.at(0).to_datetime)
end
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册