aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-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