diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
commit | 13c6c3cfc59ff0b400b294dce15f32752b0fb5f5 (patch) | |
tree | 052ac9c8f4adb91a4b32e3b2a97b1bc6bdace2e6 /activerecord/test | |
parent | ccb96f2297e8783165cba764e9b5d51e1a15ff87 (diff) | |
parent | 4e60eebae05aeec65e4894e3901c9d61c9b32910 (diff) | |
download | rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.gz rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.bz2 rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.zip |
Merge commit 'origin/master' into savepoints
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 39d38c4e1e..10cdbdc622 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -68,6 +68,18 @@ class DirtyTest < ActiveRecord::TestCase end end + def test_nullable_integer_zero_to_string_zero_not_marked_as_changed + pirate = Pirate.new + pirate.parrot_id = 0 + pirate.catchphrase = 'arrr' + assert pirate.save! + + assert !pirate.changed? + + pirate.parrot_id = '0' + assert !pirate.changed? + end + def test_zero_to_blank_marked_as_changed pirate = Pirate.new pirate.catchphrase = "Yarrrr, me hearties" |