diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-06-04 03:47:10 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-06-04 03:47:10 -0700 |
commit | 2186540f9160b47e075b9926d12d3a6843e95d31 (patch) | |
tree | 26c5a95e9ba7ec2eeb804e34a5a9ab4ab9994c60 /activerecord/test | |
parent | d10eb699649f9d7fa7e51ae1b633545d6a55e1ad (diff) | |
parent | 635032fe3ba3d189e9c62eadb6e604f22669414d (diff) | |
download | rails-2186540f9160b47e075b9926d12d3a6843e95d31.tar.gz rails-2186540f9160b47e075b9926d12d3a6843e95d31.tar.bz2 rails-2186540f9160b47e075b9926d12d3a6843e95d31.zip |
Merge pull request #6619 from kennyj/fix_6591
Fix #6591 Rails 3.2.5 Regression: incorrect _changed? for datetimes
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 2650040a80..46d485135f 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -78,6 +78,17 @@ class DirtyTest < ActiveRecord::TestCase 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 |