diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-03 17:03:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-03 17:03:55 -0700 |
commit | ac4fe778577c8b1eea641ef04b4d2b81fc54694d (patch) | |
tree | aac97ab7016466ea5023de44dc8ecb4734d68618 /test/visitors | |
parent | c9517c1b62e7d8acd5a45f72b148942ff2f549a7 (diff) | |
parent | 3712071148485a8a6f2e28944f1d4932ce72b4bd (diff) | |
download | rails-ac4fe778577c8b1eea641ef04b4d2b81fc54694d.tar.gz rails-ac4fe778577c8b1eea641ef04b4d2b81fc54694d.tar.bz2 rails-ac4fe778577c8b1eea641ef04b4d2b81fc54694d.zip |
Merge pull request #56 from dcadenas/master
Add nodes that represent boolean constants
Diffstat (limited to 'test/visitors')
-rw-r--r-- | test/visitors/test_to_sql.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index b52722ddd6..3b58c71cd8 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -325,6 +325,22 @@ module Arel end end + describe 'Constants' do + it "should handle true" do + test = Table.new(:users).create_true + @visitor.accept(test).must_be_like %{ + TRUE + } + end + + it "should handle false" do + test = Table.new(:users).create_false + @visitor.accept(test).must_be_like %{ + FALSE + } + end + end + describe 'TableAlias' do it "should use the underlying table for checking columns" do test = Table.new(:users).alias('zomgusers')[:id].eq '3' |