aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-29 14:15:58 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-29 14:15:58 -0800
commit20cd623aba6cc0c1b08b7d6fcf277633cfe236d4 (patch)
tree9a5a553b7a0438376800a2b1fac14d4568cdb69a /test/visitors
parentc86c37e5f32ca76fa7aa77e62018e368dbb37a54 (diff)
downloadrails-20cd623aba6cc0c1b08b7d6fcf277633cfe236d4.tar.gz
rails-20cd623aba6cc0c1b08b7d6fcf277633cfe236d4.tar.bz2
rails-20cd623aba6cc0c1b08b7d6fcf277633cfe236d4.zip
update statement supported
Diffstat (limited to 'test/visitors')
-rw-r--r--test/visitors/test_depth_first.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb
index eff60576fc..fd91dd5fb9 100644
--- a/test/visitors/test_depth_first.rb
+++ b/test/visitors/test_depth_first.rb
@@ -71,6 +71,19 @@ module Arel
@visitor.accept hash
assert_equal [:a, :b, node, :a, :b, node, hash], @collector.calls
end
+
+ def test_update_statement
+ stmt = Nodes::UpdateStatement.new
+ stmt.relation = :a
+ stmt.values << :b
+ stmt.wheres << :c
+ stmt.orders << :d
+ stmt.limit = :e
+
+ @visitor.accept stmt
+ assert_equal [:a, :b, stmt.values, :c, stmt.wheres, :d, stmt.orders,
+ :e, stmt], @collector.calls
+ end
end
end
end