diff options
author | kennyj <kennyj@gmail.com> | 2013-03-01 01:55:20 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-03-01 02:47:57 +0900 |
commit | e2a4b7a506e36839771284942829cbbe8d40b377 (patch) | |
tree | 7401e84147410032910b6669e7e4bc9484af53d2 /activerecord/test | |
parent | 8f6b70f1fd49b8520a744cc90102051043faf315 (diff) | |
download | rails-e2a4b7a506e36839771284942829cbbe8d40b377.tar.gz rails-e2a4b7a506e36839771284942829cbbe8d40b377.tar.bz2 rails-e2a4b7a506e36839771284942829cbbe8d40b377.zip |
Wrong exception is occured when raising no translatable exception
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb | 6 |
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 872204c644..05e0f0e192 100644 --- a/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb +++ b/activerecord/test/cases/adapters/postgresql/postgresql_adapter_test.rb @@ -250,6 +250,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| |