aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_to_sql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_to_sql.rb')
-rw-r--r--test/visitors/test_to_sql.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index a88c888908..c03d89cfef 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])