From 2f681254ee9481f30baa53720c1570decb437725 Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Mon, 30 Apr 2012 10:49:20 -0500 Subject: delete_all raise an error if a limit is provided - fixes #4979 --- activerecord/test/cases/relations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3