From 56bed512f92050f95701eca4f918086a8f1cda1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 30 Mar 2010 01:04:34 +0200 Subject: Fix dom_id for ActiveRecord [#4296 state:resolved] --- activerecord/test/cases/pk_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test/cases/pk_test.rb') diff --git a/activerecord/test/cases/pk_test.rb b/activerecord/test/cases/pk_test.rb index 5bba1d5625..33ad5992de 100644 --- a/activerecord/test/cases/pk_test.rb +++ b/activerecord/test/cases/pk_test.rb @@ -23,6 +23,12 @@ class PrimaryKeysTest < ActiveRecord::TestCase assert_equal keyboard.to_key, [keyboard.id] end + def test_to_key_with_primary_key_after_destroy + topic = Topic.find(1) + topic.destroy + assert_equal topic.to_key, [1] + end + def test_integer_key topic = Topic.find(1) assert_equal(topics(:first).author_name, topic.author_name) -- cgit v1.2.3