diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-06-13 20:09:40 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-06-13 20:09:40 -0300 |
commit | 62207faee92c820da9fbc9cc6fe785461c2d826b (patch) | |
tree | 5c391827049475110dea8d8fafadff8f7e630d13 /test/visitors | |
parent | af07bd12fd182de04a2829a5db3ae1abac299174 (diff) | |
download | rails-62207faee92c820da9fbc9cc6fe785461c2d826b.tar.gz rails-62207faee92c820da9fbc9cc6fe785461c2d826b.tar.bz2 rails-62207faee92c820da9fbc9cc6fe785461c2d826b.zip |
Do not generate NOT IN (NULL) when empty right
Diffstat (limited to 'test/visitors')
-rw-r--r-- | test/visitors/test_to_sql.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index f832bdf925..58eec1f63b 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -167,10 +167,10 @@ module Arel } end - it "should turn empty right to NULL" do + it "should return IN () when empty right which is invalid SQL" do node = @attr.in [] @visitor.accept(node).must_be_like %{ - "users"."id" IN (NULL) + "users"."id" IN () } end @@ -255,10 +255,10 @@ module Arel } end - it "should turn empty right to NULL" do + it "should return NOT IN () when empty right which is invalid SQL" do node = @attr.not_in [] @visitor.accept(node).must_be_like %{ - "users"."id" NOT IN (NULL) + "users"."id" NOT IN () } end |