aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2014-11-20 21:58:08 +0900
committerYasuo Honda <yasuo.honda@gmail.com>2014-11-20 22:31:39 +0900
commit2eb824e939a1a147854b5c4bb42cd9c9d320bea3 (patch)
treec2913a9402484037832b5635c495cdbd86fc49d0 /test/visitors
parenta04851702b0e8e694a92139c3ee9f3b1622f3f5d (diff)
downloadrails-2eb824e939a1a147854b5c4bb42cd9c9d320bea3.tar.gz
rails-2eb824e939a1a147854b5c4bb42cd9c9d320bea3.tar.bz2
rails-2eb824e939a1a147854b5c4bb42cd9c9d320bea3.zip
Support Oracle bind parameter value
Diffstat (limited to 'test/visitors')
-rw-r--r--test/visitors/test_oracle.rb13
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