aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_depth_first.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-29 14:30:06 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-29 14:30:06 -0800
commitad16c18cc3a7db4b56611b9244140f0b495a1214 (patch)
treeb4c5e3cc7fd2021ee5a4343ea2839890865c3173 /test/visitors/test_depth_first.rb
parent4b91cbc688b2fdc09a4a67a018c6bcb773934ea1 (diff)
downloadrails-ad16c18cc3a7db4b56611b9244140f0b495a1214.tar.gz
rails-ad16c18cc3a7db4b56611b9244140f0b495a1214.tar.bz2
rails-ad16c18cc3a7db4b56611b9244140f0b495a1214.zip
insert statements supported
Diffstat (limited to 'test/visitors/test_depth_first.rb')
-rw-r--r--test/visitors/test_depth_first.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb
index 04c5096f5b..32778f7d4b 100644
--- a/test/visitors/test_depth_first.rb
+++ b/test/visitors/test_depth_first.rb
@@ -120,6 +120,16 @@ module Arel
:e,
ss], @collector.calls
end
+
+ def test_insert_statement
+ stmt = Nodes::InsertStatement.new
+ stmt.relation = :a
+ stmt.columns << :b
+ stmt.values = :c
+
+ @visitor.accept stmt
+ assert_equal [:a, :b, stmt.columns, :c, stmt], @collector.calls
+ end
end
end
end