From 20cd623aba6cc0c1b08b7d6fcf277633cfe236d4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Nov 2010 14:15:58 -0800 Subject: update statement supported --- test/visitors/test_depth_first.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/visitors') 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 -- cgit v1.2.3