Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into adequaterecord

* master:
  fix exception translation
  translate exceptions on prepared statement failure
  test to ensure bad prepared statements raise a StatementInvalid exception
  • Loading branch information...
commit 5ac2879b08b05b7f6eaebc5473e62b4576f84a3f 2 parents 15ff426 + 1543863
@tenderlove tenderlove authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 activerecord/test/cases/adapters/postgresql/schema_test.rb
View
6 activerecord/test/cases/adapters/postgresql/schema_test.rb
@@ -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]]
Please sign in to comment.
Something went wrong with that request. Please try again.