aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2013-04-23 09:48:46 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2013-04-23 09:48:46 -0700
commite58f11683003ec1515113103895e18a8c9003aa3 (patch)
tree2675742308ccf48e47a271cbcefad302db85a580 /activerecord/test/cases
parent7389df139a35436f00876c96d20e81ba23c93f0a (diff)
downloadrails-e58f11683003ec1515113103895e18a8c9003aa3.tar.gz
rails-e58f11683003ec1515113103895e18a8c9003aa3.tar.bz2
rails-e58f11683003ec1515113103895e18a8c9003aa3.zip
Remove test case also related to the belongs_to touch feature
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/timestamp_test.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/activerecord/test/cases/timestamp_test.rb b/activerecord/test/cases/timestamp_test.rb
index 22c5da3faa..777a2b70dd 100644
--- a/activerecord/test/cases/timestamp_test.rb
+++ b/activerecord/test/cases/timestamp_test.rb
@@ -176,26 +176,6 @@ class TimestampTest < ActiveRecord::TestCase
assert_not_equal time, owner.updated_at
end
- def test_clearing_association_touches_the_old_record
- klass = Class.new(ActiveRecord::Base) do
- def self.name; 'Toy'; end
- belongs_to :pet, touch: true
- end
-
- toy = klass.find(1)
- pet = toy.pet
- time = 3.days.ago.at_beginning_of_hour
-
- pet.update_columns(updated_at: time)
-
- toy.pet = nil
- toy.save!
-
- pet.reload
-
- assert_not_equal time, pet.updated_at
- end
-
def test_timestamp_attributes_for_create
toy = Toy.first
assert_equal toy.send(:timestamp_attributes_for_create), [:created_at, :created_on]