diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-22 05:24:00 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-22 05:24:00 -0700 |
commit | a4299937423138caf9e0018c50649cd12d63fd32 (patch) | |
tree | f195b42858790c425be870f71535afb461ceb596 /activerecord/test/cases | |
parent | 9b6926d317257d887480926e6df5b428f169ff7a (diff) | |
parent | fb2d62d0cd56edbba7d7628d9329608228f1e1dd (diff) | |
download | rails-a4299937423138caf9e0018c50649cd12d63fd32.tar.gz rails-a4299937423138caf9e0018c50649cd12d63fd32.tar.bz2 rails-a4299937423138caf9e0018c50649cd12d63fd32.zip |
Merge pull request #10295 from senny/10237_dirty_with_nullable_datetime
Also assign nil in dirty nullable_datetime test. Closes #10237
Diffstat (limited to 'activerecord/test/cases')
-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 |