aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorHemant Kumar <hkumar@crri.co.in>2010-09-22 01:30:10 +0530
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-21 13:58:09 -0700
commit953d129bb200924db1bf11c25e893416ca93339c (patch)
tree69d42ea08c7f9c601123bc37245288ffdad98a04 /activerecord/test/cases/associations
parent96bd936b64ae06d4c38e8de862521e22d7c809b9 (diff)
downloadrails-953d129bb200924db1bf11c25e893416ca93339c.tar.gz
rails-953d129bb200924db1bf11c25e893416ca93339c.tar.bz2
rails-953d129bb200924db1bf11c25e893416ca93339c.zip
remove join table rows before removing owner row for habtm associations, fixes#5674
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
index 8bb8edde0e..2bdf9d8971 100644
--- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
@@ -425,7 +425,7 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
def test_removing_associations_on_destroy
david = DeveloperWithBeforeDestroyRaise.find(1)
assert !david.projects.empty?
- assert_nothing_raised { david.destroy }
+ assert_raise(RuntimeError) { david.destroy }
assert david.projects.empty?
assert DeveloperWithBeforeDestroyRaise.connection.select_all("SELECT * FROM developers_projects WHERE developer_id = 1").empty?
end