aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-30 01:04:34 +0200
committerJosé Valim <jose.valim@gmail.com>2010-03-30 01:32:26 +0200
commit56bed512f92050f95701eca4f918086a8f1cda1e (patch)
tree70d36bf93772612bf7ddda398bf1af7a01944b5f /activerecord/test/cases
parentb94c4080e5ba738b76b44d954bd8b13ff13e8688 (diff)
downloadrails-56bed512f92050f95701eca4f918086a8f1cda1e.tar.gz
rails-56bed512f92050f95701eca4f918086a8f1cda1e.tar.bz2
rails-56bed512f92050f95701eca4f918086a8f1cda1e.zip
Fix dom_id for ActiveRecord [#4296 state:resolved]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/pk_test.rb6
1 files changed, 6 insertions, 0 deletions
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)