diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2016-04-05 20:48:48 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2016-04-11 17:48:49 +0000 |
commit | 653966773238f82c78b4aa55379e624cd407e588 (patch) | |
tree | a6cfa9ab2f2715b11cf9b0d1f8977b94023c70a4 /test | |
parent | 7a5faf5fee02accd6d96963444ad5c386613b91f (diff) | |
download | rails-653966773238f82c78b4aa55379e624cd407e588.tar.gz rails-653966773238f82c78b4aa55379e624cd407e588.tar.bz2 rails-653966773238f82c78b4aa55379e624cd407e588.zip |
Support Oracle bind parameter value for Oracle12 visitor
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_oracle12.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/visitors/test_oracle12.rb b/test/visitors/test_oracle12.rb index df0f01b30b..d6fbf8912b 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 @@ -42,6 +43,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 |