diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 11:06:19 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-28 12:02:11 -0200 |
commit | f3aaf6d7d192eeead15458e2d042811b9681dd9c (patch) | |
tree | c19151ea05783ef2fef275dcbde5cc5ff868d5a5 /activerecord | |
parent | daa7b4e2f0f045af0dbecc6f531976fe68132cab (diff) | |
download | rails-f3aaf6d7d192eeead15458e2d042811b9681dd9c.tar.gz rails-f3aaf6d7d192eeead15458e2d042811b9681dd9c.tar.bz2 rails-f3aaf6d7d192eeead15458e2d042811b9681dd9c.zip |
Use assert_nil instead of assert_equal
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG.md | 2 | ||||
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 66359fb80f..ee99e86157 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,6 +1,6 @@ ## Rails 4.0.0 (unreleased) ## -* Fix dirty attribute checks for TimeZoneConversion with nil and blank +* Fix dirty attribute checks for `TimeZoneConversion` with nil and blank datetime attributes. Setting a nil datetime to a blank string should not result in a change being flagged. Fix #8310 diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 6fd9a9d11d..d3cbd839f6 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -209,10 +209,10 @@ class DirtyTest < ActiveRecord::TestCase target.table_name = 'topics' topic = target.create - assert_equal nil, topic.written_on + assert_nil topic.written_on topic.written_on = "" - assert_equal nil, topic.written_on + assert_nil topic.written_on assert !topic.written_on_changed? end end |