diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-11-15 19:55:47 -0500 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-11-22 13:53:23 -0500 |
commit | 192b7bcfacd550312b37e74d858b63b77d2469d5 (patch) | |
tree | 553569b30ced5a658e5896c3edc730071f1c95fe /activerecord/test/cases/adapter_test.rb | |
parent | 47ab6b36d794e68e76dcb45463c0d2a5bdba2104 (diff) | |
download | rails-192b7bcfacd550312b37e74d858b63b77d2469d5.tar.gz rails-192b7bcfacd550312b37e74d858b63b77d2469d5.tar.bz2 rails-192b7bcfacd550312b37e74d858b63b77d2469d5.zip |
Redact SQL in errors
Move `ActiveRecord::StatementInvalid` SQL to error property.
Also add bindings as an error property.
Diffstat (limited to 'activerecord/test/cases/adapter_test.rb')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 64c2b51f83..d3ed59bccd 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -286,18 +286,6 @@ module ActiveRecord assert_equal "special_db_type", @connection.type_to_sql(:special_db_type) end - unless current_adapter?(:PostgreSQLAdapter) - def test_log_invalid_encoding - error = assert_raises RuntimeError do - @connection.send :log, "SELECT 'ы' FROM DUAL" do - raise (+"ы").force_encoding(Encoding::ASCII_8BIT) - end - end - - assert_equal "ы", error.message - end - end - def test_supports_multi_insert_is_deprecated assert_deprecated { @connection.supports_multi_insert? } end |