diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_oracle.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/visitors/test_oracle.rb b/test/visitors/test_oracle.rb index 29d7042084..41e77d93c0 100644 --- a/test/visitors/test_oracle.rb +++ b/test/visitors/test_oracle.rb @@ -4,7 +4,8 @@ module Arel module Visitors describe 'the oracle visitor' do before do - @visitor = Oracle.new Table.engine.connection_pool + @visitor = Oracle.new Table.engine.connection + @table = Table.new(:users) end def compile node @@ -165,6 +166,16 @@ module Arel compile(node).must_be_like "FOR UPDATE" end end + + describe "Nodes::BindParam" do + it "increments each bind param" do + query = @table[:name].eq(Arel::Nodes::BindParam.new) + .and(@table[:id].eq(Arel::Nodes::BindParam.new)) + compile(query).must_be_like %{ + "users"."name" = :a1 AND "users"."id" = :a2 + } + end + end end end end |