From 2e74177d0b61f872b773285471ff9025f0eaa96c Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 11 Apr 2008 16:04:11 +1200 Subject: Revert "Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy]" This reverts commit c67e985994362290308073ed2793dd8e7f2a76db. --- .../test/cases/associations/belongs_to_associations_test.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index 75f236aca0..b8ec9117af 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -377,16 +377,4 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase assert companies(:first_client).readonly_firm.readonly? end - def test_save_fails_for_invalid_belongs_to - log = AuditLog.new - assert log.valid? - - log.build_developer # Build invalid association - assert !log.developer.valid? - assert !log.valid? - assert_equal "is invalid", log.errors.on("developer") - - assert !log.save - end - end -- cgit v1.2.3