aboutsummaryrefslogtreecommitdiffstats
path: root/test/collectors/test_bind_collector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/collectors/test_bind_collector.rb')
-rw-r--r--test/collectors/test_bind_collector.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/collectors/test_bind_collector.rb b/test/collectors/test_bind_collector.rb
index c7748d7d10..036d8f05fe 100644
--- a/test/collectors/test_bind_collector.rb
+++ b/test/collectors/test_bind_collector.rb
@@ -57,6 +57,14 @@ module Arel
assert_equal 'SELECT FROM "users" WHERE "users"."age" = hello AND "users"."name" = world', list.join
end
+
+ def test_compile
+ bv = Nodes::BindParam.new('?')
+ collector = collect ast_with_binds bv
+
+ sql = collector.compile ["hello", "world"]
+ assert_equal 'SELECT FROM "users" WHERE "users"."age" = hello AND "users"."name" = world', sql
+ end
end
end
end