aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-03-27 08:22:32 +0000
committerPratik Naik <pratiknaik@gmail.com>2010-03-27 08:22:32 +0000
commit68ade93cde3fcb3ac9fdfe0541d33d22c2c748d7 (patch)
tree744c4945f86603985402e40a4d519f6a4bd15a36 /activerecord/test
parent62937b8fb09f351e94f84d1f6e275e259784b8c0 (diff)
downloadrails-68ade93cde3fcb3ac9fdfe0541d33d22c2c748d7.tar.gz
rails-68ade93cde3fcb3ac9fdfe0541d33d22c2c748d7.tar.bz2
rails-68ade93cde3fcb3ac9fdfe0541d33d22c2c748d7.zip
Revert "Changed behavior of touch and added touch! Originally implemented by Obie Fernandez, updated touch! to act as a thin wrapper to touch. [#2520 state:resolved]"
This reverts commit 3a875e618487a06a56f6cf912cf5440f294921cc.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/timestamp_test.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/activerecord/test/cases/timestamp_test.rb b/activerecord/test/cases/timestamp_test.rb
index 6c3596347d..24b237a72b 100644
--- a/activerecord/test/cases/timestamp_test.rb
+++ b/activerecord/test/cases/timestamp_test.rb
@@ -30,24 +30,6 @@ class TimestampTest < ActiveRecord::TestCase
assert @previously_updated_at != @developer.updated_at
end
- def test_touching_a_record_updates_its_timestamp_even_if_object_instance_is_invalid
- @developer.name = nil
- @developer.touch
-
- assert @previously_updated_at != @developer.updated_at
- end
-
- def test_touch_bang_a_record_updates_its_timestamp
- @developer.touch!
-
- assert @previously_updated_at != @developer.updated_at
- end
-
- def test_touch_banging_a_record_fails_if_object_instance_is_invalid
- @developer.name = nil
- assert_raise(ActiveRecord::RecordInvalid) { @developer.touch! }
- end
-
def test_touching_a_different_attribute
previously_created_at = @developer.created_at
@developer.touch(:created_at)
@@ -55,13 +37,6 @@ class TimestampTest < ActiveRecord::TestCase
assert previously_created_at != @developer.created_at
end
- def test_touch_banging_a_different_attribute
- previously_created_at = @developer.created_at
- @developer.touch!(:created_at)
-
- assert previously_created_at != @developer.created_at
- end
-
def test_saving_a_record_with_a_belongs_to_that_specifies_touching_the_parent_should_update_the_parent_updated_at
pet = Pet.first
owner = pet.owner