mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test for NamedFunction predication chaining
This commit is contained in:
parent
af5c81339a
commit
e86d4e035b
1 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,12 @@ module Arel
|
|||
assert_equal 'omg(*)', @visitor.accept(function)
|
||||
end
|
||||
|
||||
it 'should chain predications on named functions' do
|
||||
function = Nodes::NamedFunction.new('omg', [Arel.star])
|
||||
sql = @visitor.accept(function.eq(2))
|
||||
sql.must_be_like %{ omg(*) = 2 }
|
||||
end
|
||||
|
||||
it 'works with lists' do
|
||||
function = Nodes::NamedFunction.new('omg', [Arel.star, Arel.star])
|
||||
assert_equal 'omg(*, *)', @visitor.accept(function)
|
||||
|
|
Loading…
Reference in a new issue