diff options
author | Brock Trappitt <brock.trappitt@gmail.com> | 2014-05-27 09:16:28 +0800 |
---|---|---|
committer | Brock Trappitt <brock.trappitt@gmail.com> | 2014-05-27 09:16:28 +0800 |
commit | c28e9efde7e0c384b5f959e6eb48fa47d073227e (patch) | |
tree | 031eefa397c02393f6855899c2c9e43944ee49e1 /test | |
parent | e7f0cbbeea28718c8ff2b588cba20ccc298347bf (diff) | |
download | rails-c28e9efde7e0c384b5f959e6eb48fa47d073227e.tar.gz rails-c28e9efde7e0c384b5f959e6eb48fa47d073227e.tar.bz2 rails-c28e9efde7e0c384b5f959e6eb48fa47d073227e.zip |
Test which checks the error being raised by #unsupported in ToSql Visitor
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_to_sql.rb | 6 |
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")' |