diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-22 11:27:12 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-22 11:27:12 -0800 |
commit | 2cce44fa7c2b5363ab847f01875c6f1b00463b01 (patch) | |
tree | 827f0b0f836106ca497ca2fd0b783f503a243275 /activerecord | |
parent | 4bd8d2607ce0078dad3f57964ca70628b2d001a2 (diff) | |
download | rails-2cce44fa7c2b5363ab847f01875c6f1b00463b01.tar.gz rails-2cce44fa7c2b5363ab847f01875c6f1b00463b01.tar.bz2 rails-2cce44fa7c2b5363ab847f01875c6f1b00463b01.zip |
expectations change when using IM. Change oracle tests to reflect that
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index b9d9d89220..8f55b7ebe6 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -965,7 +965,10 @@ class TestAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCase values = [@pirate.reload.catchphrase, @pirate.ship.name, *@pirate.ship.parts.map(&:name)] # Oracle saves empty string as NULL if current_adapter?(:OracleAdapter) - assert_equal [nil, nil, nil, nil], values + expected = ActiveRecord::IdentityMap.enabled? ? + [nil, nil, '', ''] : + [nil, nil, nil, nil] + assert_equal expected, values else assert_equal ['', '', '', ''], values end @@ -1060,7 +1063,8 @@ class TestAutosaveAssociationOnABelongsToAssociation < ActiveRecord::TestCase @ship.save(:validate => false) # Oracle saves empty string as NULL if current_adapter?(:OracleAdapter) - assert_equal [nil, nil], [@ship.reload.name, @ship.pirate.catchphrase] + expected = ActiveRecord::IdentityMap.enabled? ? [nil, ''] : [nil, nil] + assert_equal expected, [@ship.reload.name, @ship.pirate.catchphrase] else assert_equal ['', ''], [@ship.reload.name, @ship.pirate.catchphrase] end |