From f3aaf6d7d192eeead15458e2d042811b9681dd9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 28 Nov 2012 11:06:19 -0200 Subject: Use assert_nil instead of assert_equal --- activerecord/CHANGELOG.md | 2 +- activerecord/test/cases/dirty_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord') 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 -- cgit v1.2.3