From 301dd3d5143077f95bebd434ca2ad1c80c1b5866 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Thu, 14 Oct 2010 12:58:47 -0300 Subject: Use hash[:Post][1] style identity maps for each table. --- activerecord/test/cases/identity_map_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/test/cases/identity_map_test.rb') 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'), -- cgit v1.2.3