aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/visitors/test_to_sql.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 05e75b5e0d..5d5a351737 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -247,6 +247,12 @@ module Arel
compile(Nodes.build_quoted(nil)).must_be_like "NULL"
end
+ it "unsupported input should not raise ArgumentError" do
+ assert_raises(RuntimeError) do
+ compile(nil)
+ end
+ end
+
it "should visit_Arel_SelectManager, which is a subquery" do
mgr = Table.new(:foo).project(:bar)
compile(mgr).must_be_like '(SELECT bar FROM "foo")'