Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add failing test for 3.2.5 datetime attribute regression

  • Loading branch information...
commit bebbdb5d4e27b2539b560cb3dafe84b1905636fc 1 parent 43f0af4
Evan Arnold earnold authored committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 activerecord/test/cases/dirty_test.rb
11 activerecord/test/cases/dirty_test.rb
View
@@ -78,6 +78,17 @@ def test_time_attributes_changes_with_time_zone
assert_equal old_created_on, pirate.created_on_was
end
end
+
+ def test_setting_time_attributes_with_time_zone_field_to_itself_should_not_be_marked_as_a_change
+ in_time_zone 'Paris' do
+ target = Class.new(ActiveRecord::Base)
+ target.table_name = 'pirates'
+
+ pirate = target.create
+ pirate.created_on = pirate.created_on
+ assert !pirate.created_on_changed?
+ end
+ end
def test_time_attributes_changes_without_time_zone_by_skip
in_time_zone 'Paris' do
Please sign in to comment.
Something went wrong with that request. Please try again.