aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_sql.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 05e75b5e0d..65d36bc004 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -247,6 +247,11 @@ module Arel
compile(Nodes.build_quoted(nil)).must_be_like "NULL"
end
+ it "unsupported input should not raise ArgumentError" do
+ error = assert_raises(RuntimeError) { compile(nil) }
+ assert_match /\Aunsupported/, error.message
+ 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")'