aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations_test.rb')
-rwxr-xr-xactiverecord/test/cases/associations_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb
index 3c14ee0881..5a9e32f774 100755
--- a/activerecord/test/cases/associations_test.rb
+++ b/activerecord/test/cases/associations_test.rb
@@ -449,11 +449,12 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
def test_not_resaved_when_unchanged
firm = Firm.find(:first, :include => :account)
+ firm.name += '-changed'
assert_queries(1) { firm.save! }
firm = Firm.find(:first)
firm.account = Account.find(:first)
- assert_queries(1) { firm.save! }
+ assert_queries(Firm.partial_updates? ? 0 : 1) { firm.save! }
firm = Firm.find(:first).clone
firm.account = Account.find(:first)