diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 15:44:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 15:44:16 -0800 |
commit | ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3 (patch) | |
tree | c082b8a030b2318edf23fbfc318c219cdc9e5d9b /test | |
parent | a78fe3b50253ef3d0f00e06ee328ee45bfe23321 (diff) | |
download | rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.tar.gz rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.tar.bz2 rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.zip |
making sure limit is correctly copied to update manager
Diffstat (limited to 'test')
-rw-r--r-- | test/test_update_manager.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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) |