diff options
author | Sergey Alekseev <sergey.alekseev.minsk@gmail.com> | 2014-05-26 16:27:57 +0300 |
---|---|---|
committer | Sergey Alekseev <sergey.alekseev.minsk@gmail.com> | 2014-05-26 16:27:57 +0300 |
commit | 416ad003716bcc883c319ec30644bab8a3cf52c7 (patch) | |
tree | 1342359378ab4aed354d7f1eea161eb343977b58 /test/visitors | |
parent | e295d61d6d4f13aee08c895751277531edb39993 (diff) | |
download | rails-416ad003716bcc883c319ec30644bab8a3cf52c7.tar.gz rails-416ad003716bcc883c319ec30644bab8a3cf52c7.tar.bz2 rails-416ad003716bcc883c319ec30644bab8a3cf52c7.zip |
Wrap nested Nodes::Grouping in brackets only once
Diffstat (limited to 'test/visitors')
-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]) |