aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-20 16:03:44 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-20 16:03:44 -0700
commitcd13c3e1dad07c1168a318feb543d3b1ede9f2cf (patch)
tree13c42f2e2427b1d5727704a940855bd345044272 /spec/arel
parent9e5a4423cdbbe161dade56306d7c4d70f5371be2 (diff)
downloadrails-cd13c3e1dad07c1168a318feb543d3b1ede9f2cf.tar.gz
rails-cd13c3e1dad07c1168a318feb543d3b1ede9f2cf.tar.bz2
rails-cd13c3e1dad07c1168a318feb543d3b1ede9f2cf.zip
dealing with empty in statements
Diffstat (limited to 'spec/arel')
-rw-r--r--spec/arel/visitors/to_sql_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb
index c8bfb845c1..b277810863 100644
--- a/spec/arel/visitors/to_sql_spec.rb
+++ b/spec/arel/visitors/to_sql_spec.rb
@@ -65,6 +65,13 @@ module Arel
"users"."id" IN (1, 2, 3)
}
end
+
+ it "should turn empty right to NULL" do
+ node = @attr.in []
+ @visitor.accept(node).should be_like %{
+ "users"."id" IN (NULL)
+ }
+ end
end
describe 'Equality' do