diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-07-01 08:11:59 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-07-11 07:29:12 -0600 |
commit | d739dd1627d1b20bde417045558848fe92a82d6c (patch) | |
tree | c495fd9dc64bcf0db4ca32e57017ae47a818eddd /activerecord/test | |
parent | 898bc73a53f4a4ba7695ed1cc81e3d94ab62b253 (diff) | |
download | rails-d739dd1627d1b20bde417045558848fe92a82d6c.tar.gz rails-d739dd1627d1b20bde417045558848fe92a82d6c.tar.bz2 rails-d739dd1627d1b20bde417045558848fe92a82d6c.zip |
Use a type object for type casting behavior on SQLite3
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/quoting_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb index 3bd53aa278..ac8332e2fa 100644 --- a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb @@ -103,6 +103,13 @@ module ActiveRecord }.new assert_raise(TypeError) { @conn.type_cast(quoted_id_obj, nil) } end + + def test_quoting_binary_strings + value = "hello".encode('ascii-8bit') + column = Column.new(nil, 1, SQLite3String.new) + + assert_equal "'hello'", @conn.quote(value, column) + end end end end |