diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-04-22 09:46:57 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-04-22 09:46:57 +0200 |
commit | fb2d62d0cd56edbba7d7628d9329608228f1e1dd (patch) | |
tree | a95d8da30e8fa5cf9b0d3730a20097e7f43859d3 /activerecord | |
parent | 07acf7b13d98eb8e3dc6628952ca908a020bbdce (diff) | |
download | rails-fb2d62d0cd56edbba7d7628d9329608228f1e1dd.tar.gz rails-fb2d62d0cd56edbba7d7628d9329608228f1e1dd.tar.bz2 rails-fb2d62d0cd56edbba7d7628d9329608228f1e1dd.zip |
also assign nil in dirty nullable_datetime test. #10237
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 7b2034dadf..36b87033ae 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -213,9 +213,11 @@ class DirtyTest < ActiveRecord::TestCase topic = target.create assert_nil topic.written_on - topic.written_on = "" - assert_nil topic.written_on - assert !topic.written_on_changed? + ["", nil].each do |value| + topic.written_on = value + assert_nil topic.written_on + assert !topic.written_on_changed? + end end end |