diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-11 18:36:46 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-11 18:36:46 -0800 |
commit | 0268b5d8cdc3c5a1337462135f0a326a2654ba1a (patch) | |
tree | e2ab3b84759a31d8b6922f079037219502c8bb8c /activerecord | |
parent | 67444ba1cb237939a8244e980387fe035436e1e5 (diff) | |
download | rails-0268b5d8cdc3c5a1337462135f0a326a2654ba1a.tar.gz rails-0268b5d8cdc3c5a1337462135f0a326a2654ba1a.tar.bz2 rails-0268b5d8cdc3c5a1337462135f0a326a2654ba1a.zip |
test for regression from a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/persistence_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index b936cca875..08dbf19e7b 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -399,6 +399,12 @@ class PersistencesTest < ActiveRecord::TestCase assert_raises(ActiveRecord::ActiveRecordError) { minivan.update_attribute(:color, 'black') } end + def test_string_ids + mv = Minivan.where(:minivan_id => 1234).first_or_initialize + assert mv.new_record? + assert_equal '1234', mv.minivan_id + end + def test_update_attribute_with_one_updated t = Topic.first t.update_attribute(:title, 'super_title') |