diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-21 19:32:36 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:10 -0300 |
commit | ab4238203f886ff6fb2b0060179d39770be6be1c (patch) | |
tree | fc49cc86d9ca956828838496065afa748eccb978 | |
parent | 21483cbc6755b1a8aae5bc2285fb439c22fb5265 (diff) | |
download | rails-ab4238203f886ff6fb2b0060179d39770be6be1c.tar.gz rails-ab4238203f886ff6fb2b0060179d39770be6be1c.tar.bz2 rails-ab4238203f886ff6fb2b0060179d39770be6be1c.zip |
Test with target object, failing on 1.9.2 when comparing object against association proxy object.
-rw-r--r-- | activerecord/test/cases/associations/identity_map_test.rb | 1 | ||||
-rw-r--r-- | activerecord/test/cases/identity_map_test.rb | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/identity_map_test.rb b/activerecord/test/cases/associations/identity_map_test.rb index cfb1d4efe0..3d3ae0594b 100644 --- a/activerecord/test/cases/associations/identity_map_test.rb +++ b/activerecord/test/cases/associations/identity_map_test.rb @@ -112,6 +112,7 @@ class InverseHasManyIdentityMapTest < ActiveRecord::TestCase m = Author.first i = Post.new(:title => 'Industrial Revolution Re-enactment', :body => 'Lorem ipsum') m.posts = [i] + assert_same m, i.author.target assert_not_nil i.author assert_equal m.name, i.author.name, "Name of man should be the same before changes to parent instance" m.name = 'Bongo' diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index d5ef993a8c..d51de22f64 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -284,14 +284,14 @@ class IdentityMapTest < ActiveRecord::TestCase assert_no_queries do comment.post end - assert_same post, comment.post + assert_same post, comment.post.target end def test_associated_object_are_assigned_from_identity_map post = Post.find(1) post.comments.each do |comment| - assert_same post, comment.post + assert_same post, comment.post.target assert_equal post.object_id, comment.post.target.object_id end end |