diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_to_sql.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 05e75b5e0d..738bbe9626 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -131,6 +131,13 @@ module Arel end end + describe 'Nodes::Grouping' do + it 'wraps nested groupings in brackets only once' do + sql = compile Nodes::Grouping.new(Nodes::Grouping.new(Nodes.build_quoted('foo'))) + sql.must_equal "('foo')" + end + end + describe 'Nodes::NotEqual' do it 'should handle false' do val = Nodes.build_quoted(false, @table[:active]) |