aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2013-03-01 01:55:20 +0900
committerJon Leighton <j@jonathanleighton.com>2013-03-20 10:11:07 +0000
commitdc2bc388bc8c6c345337052bf0d60f5243d899d4 (patch)
tree3f4ec4d6873f1ab94af33fe37701d46e0a43f8cf /activerecord/test
parentbe913c3964069fa9ff7c8a615e06705e3a6ec435 (diff)
downloadrails-dc2bc388bc8c6c345337052bf0d60f5243d899d4.tar.gz
rails-dc2bc388bc8c6c345337052bf0d60f5243d899d4.tar.bz2
rails-dc2bc388bc8c6c345337052bf0d60f5243d899d4.zip
Wrong exception is occured when raising no translatable exception
Conflicts: activerecord/CHANGELOG.md
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
index 0de3786eb8..6c345cd8cc 100644
--- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb
@@ -188,6 +188,12 @@ module ActiveRecord
assert_equal "DISTINCT posts.title, posts.updater_id AS alias_0", @connection.distinct("posts.title", ["posts.updater_id desc nulls last"])
end
+ def test_raise_error_when_cannot_translate_exception
+ assert_raise TypeError do
+ @connection.send(:log, nil) { @connection.execute(nil) }
+ end
+ end
+
private
def insert(ctx, data)
binds = data.map { |name, value|