diff options
author | Marcin Raczkowski <marcin.raczkowski@gmail.com> | 2010-08-29 12:04:43 +0200 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:04:39 -0300 |
commit | ccb335da1f293dc745be0171ce3d95e50223d934 (patch) | |
tree | f4526ff6fddd72274a7dc11c355ba365b501da07 /activerecord/test/cases/autosave_association_test.rb | |
parent | 3ab625f984d3f014735117fb7d0fcf2ff076ff11 (diff) | |
download | rails-ccb335da1f293dc745be0171ce3d95e50223d934.tar.gz rails-ccb335da1f293dc745be0171ce3d95e50223d934.tar.bz2 rails-ccb335da1f293dc745be0171ce3d95e50223d934.zip |
IdentityMap - Adjustments to test cases
Diffstat (limited to 'activerecord/test/cases/autosave_association_test.rb')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index b13cb2d7a2..59fc13fe51 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -578,7 +578,7 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase @pirate.ship.mark_for_destruction assert !@pirate.reload.marked_for_destruction? - assert !@pirate.ship.marked_for_destruction? + assert !@pirate.ship.target.reload.marked_for_destruction? end # has_one @@ -1194,6 +1194,7 @@ class TestAutosaveAssociationValidationsOnAHasOneAssociation < ActiveRecord::Tes self.use_transactional_fixtures = false def setup + ActiveRecord::IdentityMap.enabled = false # This tests use trick with double association, IM prevents that, so we disable it. @pirate = Pirate.create(:catchphrase => "Don' botharrr talkin' like one, savvy?") @pirate.create_ship(:name => 'titanic') end @@ -1209,6 +1210,10 @@ class TestAutosaveAssociationValidationsOnAHasOneAssociation < ActiveRecord::Tes @pirate.non_validated_ship.name = '' assert @pirate.valid? end + + def teardown + ActiveRecord::IdentityMap.enabled = true + end end class TestAutosaveAssociationValidationsOnABelongsToAssociation < ActiveRecord::TestCase |