diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-01 12:12:07 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-01 12:12:07 -0700 |
commit | 7d2df5fa62da393e429393ccd161d237117932fd (patch) | |
tree | 1b3c669232c182b0cba0a9ac9e1fc1eee824493e /activerecord/test/cases | |
parent | b2a24a15785e94078bae87946ffa43bc59bccfec (diff) | |
parent | 2f681254ee9481f30baa53720c1570decb437725 (diff) | |
download | rails-7d2df5fa62da393e429393ccd161d237117932fd.tar.gz rails-7d2df5fa62da393e429393ccd161d237117932fd.tar.bz2 rails-7d2df5fa62da393e429393ccd161d237117932fd.zip |
Merge pull request #6089 from frodsan/delete_all_limit
delete_all raise an error if a limit is provided - fixes #4979
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 4b8b57bac2..3ef357e297 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -688,6 +688,10 @@ class RelationTest < ActiveRecord::TestCase assert davids.loaded? end + def test_delete_all_limit_error + assert_raises(ActiveRecord::ActiveRecordError) { Author.limit(10).delete_all } + end + def test_select_argument_error assert_raises(ArgumentError) { Developer.select } end |