diff options
author | Arturo Pie <arturotd08@yahoo.ca> | 2012-03-26 22:45:48 -0400 |
---|---|---|
committer | Arturo Pie <arturotd08@yahoo.ca> | 2012-03-29 22:24:15 -0400 |
commit | 714a2c810deb9d219442f7c981e61eb6d5c45d33 (patch) | |
tree | ea9da2e56283d4c79bfc58d2c2edf8e8a757c529 /activerecord/test/cases/identity_map_test.rb | |
parent | 2c8f84d3a6b199b04394ed1a5bba3bc0d8f1e811 (diff) | |
download | rails-714a2c810deb9d219442f7c981e61eb6d5c45d33.tar.gz rails-714a2c810deb9d219442f7c981e61eb6d5c45d33.tar.bz2 rails-714a2c810deb9d219442f7c981e61eb6d5c45d33.zip |
refactor the checking of the attributes of the record in IdentityMap#add, so it's more readable
Diffstat (limited to 'activerecord/test/cases/identity_map_test.rb')
-rw-r--r-- | activerecord/test/cases/identity_map_test.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index 2a490126e2..63d0bcf1fc 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -404,11 +404,12 @@ class IdentityMapTest < ActiveRecord::TestCase assert comment.save end - def test_do_not_add_to_identity_map_if_record_do_not_contain_all_columns - post = Post.select(:id).first - comment = post.comments[0] + def test_do_not_add_to_repository_if_record_does_not_contain_all_columns + author = Author.select(:id).first + post = author.posts.first + assert_nothing_raised do - assert_not_nil comment.post.title + assert_not_nil post.author.name end end |