aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-10-13 20:44:39 +0000
committerMarcel Molina <marcel@vernix.org>2005-10-13 20:44:39 +0000
commitebf618b7fc39d66852f666c12b79fd6e71da0e3a (patch)
tree6b61e6e86ee913a3d2b5f4fe7a866bde2d0e071b /activerecord/test
parentf0448f5631288e3b73f9c95ebc1870dd54967a87 (diff)
downloadrails-ebf618b7fc39d66852f666c12b79fd6e71da0e3a.tar.gz
rails-ebf618b7fc39d66852f666c12b79fd6e71da0e3a.tar.bz2
rails-ebf618b7fc39d66852f666c12b79fd6e71da0e3a.zip
Delegate access to a customized primary key to the conventional id method. Closes #2444.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/pk_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/pk_test.rb b/activerecord/test/pk_test.rb
index 24f9bc4097..d77982df1b 100644
--- a/activerecord/test/pk_test.rb
+++ b/activerecord/test/pk_test.rb
@@ -30,10 +30,10 @@ class PrimaryKeysTest < Test::Unit::TestCase
assert_equal keyboard.id, Keyboard.find_by_name('HHKB').id
end
- def test_customized_primary_key_can_be_set_before_saving
+ def test_customized_primary_key_can_be_get_before_saving
keyboard = Keyboard.new
assert_respond_to(keyboard, :key_number)
- assert_nothing_raised { keyboard.key_number = 1 }
+ assert_nothing_raised { keyboard.key_number }
end
def test_customized_string_primary_key_settable_before_save