From ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 3 Jan 2011 15:44:16 -0800 Subject: making sure limit is correctly copied to update manager --- test/test_update_manager.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/test_update_manager.rb b/test/test_update_manager.rb index 5823845ba0..62a2eccaf5 100644 --- a/test/test_update_manager.rb +++ b/test/test_update_manager.rb @@ -8,6 +8,15 @@ module Arel end end + it 'handles limit properly' do + table = Table.new(:users) + um = Arel::UpdateManager.new Table.engine + um.take 10 + um.table table + um.set [[table[:name], nil]] + assert_match(/LIMIT 10/, um.to_sql) + end + describe 'set' do it "updates with null" do table = Table.new(:users) -- cgit v1.2.3