From 62207faee92c820da9fbc9cc6fe785461c2d826b Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 13 Jun 2012 20:09:40 -0300 Subject: Do not generate NOT IN (NULL) when empty right --- test/visitors/test_to_sql.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/visitors/test_to_sql.rb') 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 -- cgit v1.2.3