diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-10-14 12:58:47 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:28 -0300 |
commit | 301dd3d5143077f95bebd434ca2ad1c80c1b5866 (patch) | |
tree | bf5d51a1bdc7b9b78303ac6a58c514d9cfb364e9 /activerecord/test/cases | |
parent | 4f3b8e107ab77848d7982b6a2bde87f4b015a98f (diff) | |
download | rails-301dd3d5143077f95bebd434ca2ad1c80c1b5866.tar.gz rails-301dd3d5143077f95bebd434ca2ad1c80c1b5866.tar.bz2 rails-301dd3d5143077f95bebd434ca2ad1c80c1b5866.zip |
Use hash[:Post][1] style identity maps for each table.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/identity_map_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index f984c42ffb..1588633e1d 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -53,6 +53,13 @@ class IdentityMapTest < ActiveRecord::TestCase ) end + def test_find_by_string_and_numeric_id + assert_same( + Client.find_by_id("3"), + Client.find_by_id(3) + ) + end + def test_find_by_pkey assert_same( Subscriber.find_by_nick('swistak'), |