diff options
author | Evan Arnold <evan.arnold@gmail.com> | 2012-06-01 12:09:33 -0700 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-06-04 21:12:44 +0900 |
commit | bebbdb5d4e27b2539b560cb3dafe84b1905636fc (patch) | |
tree | f78dd752fc1d644ecb6e1d88d693c1e62055df65 /activerecord/test | |
parent | 43f0af4d39a5d8c1191fef589d947fc92a34f7d4 (diff) | |
download | rails-bebbdb5d4e27b2539b560cb3dafe84b1905636fc.tar.gz rails-bebbdb5d4e27b2539b560cb3dafe84b1905636fc.tar.bz2 rails-bebbdb5d4e27b2539b560cb3dafe84b1905636fc.zip |
Add failing test for 3.2.5 datetime attribute regression
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 b1ce846218..2a3d6a6cc1 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 |