提交 c1bbf1b2 编写于 作者: A Aaron Patterson

test to ensure bad prepared statements raise a StatementInvalid exception

上级 486db21f
......@@ -115,6 +115,12 @@ def test_raise_drop_schema_with_nonexisting_schema
end
end
def test_raise_wraped_exception_on_bad_prepare
assert_raises(ActiveRecord::StatementInvalid) do
@connection.exec_query "select * from developers where id = ?", 'sql', [[nil, 1]]
end
end
def test_schema_change_with_prepared_stmt
altered = false
@connection.exec_query "select * from developers where id = $1", 'sql', [[nil, 1]]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册