aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/identity_map_test.rb1
-rw-r--r--activerecord/test/cases/identity_map_test.rb4
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