diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 16:15:18 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 16:15:18 -0300 |
commit | 3793b4063ada64502d0c8221ddacab35b2e7f7ea (patch) | |
tree | 4a5a3e0aaf43fd91a815b5c64fe4399e0c00d84f /activerecord/test/cases | |
parent | dbe7fe289c8f32250bf6161e466d52f9d90154cf (diff) | |
parent | c46ff516a25684a2d04d453b2db44d6fa224c350 (diff) | |
download | rails-3793b4063ada64502d0c8221ddacab35b2e7f7ea.tar.gz rails-3793b4063ada64502d0c8221ddacab35b2e7f7ea.tar.bz2 rails-3793b4063ada64502d0c8221ddacab35b2e7f7ea.zip |
Merge pull request #8547 from printercu/patch-1
fix for messages in invalid encoding from db-drivers
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
activerecord/test/cases/connection_adapters/abstract_adapter_test.rb
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 6f84bae432..6656a9bf50 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -213,6 +213,14 @@ module ActiveRecord test "type_to_sql returns a String for unmapped types" do assert_equal "special_db_type", @connection.type_to_sql(:special_db_type) end + + def test_log_invalid_encoding + assert_raise ActiveRecord::StatementInvalid do + @connection.send :log, "SELECT 'ы' FROM DUAL" do + raise 'ы'.force_encoding(Encoding::ASCII_8BIT) + end + end + end end class AdapterTestWithoutTransaction < ActiveRecord::TestCase |