diff options
Diffstat (limited to 'test/collectors/test_sql_string.rb')
-rw-r--r-- | test/collectors/test_sql_string.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/collectors/test_sql_string.rb b/test/collectors/test_sql_string.rb index 8651296ff8..debec8e9c9 100644 --- a/test/collectors/test_sql_string.rb +++ b/test/collectors/test_sql_string.rb @@ -33,6 +33,14 @@ module Arel sql = collector.compile ["hello", "world"] assert_equal 'SELECT FROM "users" WHERE "users"."age" = ? AND "users"."name" = ?', sql end + + def test_returned_sql_uses_utf8_encoding + bv = Nodes::BindParam.new(nil) + collector = collect ast_with_binds bv + + sql = collector.compile ["hello", "world"] + assert_equal sql.encoding, Encoding::UTF_8 + end end end end |