aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors')
-rw-r--r--test/visitors/test_oracle12.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/visitors/test_oracle12.rb b/test/visitors/test_oracle12.rb
index 3263007ddb..5dac2994cf 100644
--- a/test/visitors/test_oracle12.rb
+++ b/test/visitors/test_oracle12.rb
@@ -2,9 +2,10 @@ require 'helper'
module Arel
module Visitors
- describe 'the oracle visitor' do
+ describe 'the oracle12 visitor' do
before do
- @visitor = Oracle12.new Table.engine.connection_pool
+ @visitor = Oracle12.new Table.engine.connection
+ @table = Table.new(:users)
end
def compile node
@@ -43,6 +44,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