aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-14 20:24:32 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-14 20:26:45 -0300
commita8e22aeadcf53a30893fbfbf6d446d504bd87b67 (patch)
treef3eeff231b1e04bff42b60a279a0571172f58053 /activerecord
parent2109fd58040b79c272d7d6ef10a7b56d313dec57 (diff)
downloadrails-a8e22aeadcf53a30893fbfbf6d446d504bd87b67.tar.gz
rails-a8e22aeadcf53a30893fbfbf6d446d504bd87b67.tar.bz2
rails-a8e22aeadcf53a30893fbfbf6d446d504bd87b67.zip
Remove unneded tests.
Before b081f6b59fb3f15d12043072ad9b331ffd2bc56e, this test are asserting that update_attribute does the dirty tracking. Since we deprecated this method and update_column write in the database directly this tests will always fail.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/dirty_test.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb
index bdc2cb264d..60497ac5d8 100644
--- a/activerecord/test/cases/dirty_test.rb
+++ b/activerecord/test/cases/dirty_test.rb
@@ -78,7 +78,7 @@ 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)
@@ -496,16 +496,6 @@ class DirtyTest < ActiveRecord::TestCase
assert_not_nil pirate.previous_changes['updated_on'][1]
assert !pirate.previous_changes.key?('parrot_id')
assert !pirate.previous_changes.key?('created_on')
-
- pirate = Pirate.find_by_catchphrase("Ahoy!")
- pirate.update_column(:catchphrase, "Ninjas suck!")
-
- assert_equal 2, pirate.previous_changes.size
- assert_equal ["Ahoy!", "Ninjas suck!"], pirate.previous_changes['catchphrase']
- assert_not_nil pirate.previous_changes['updated_on'][0]
- assert_not_nil pirate.previous_changes['updated_on'][1]
- assert !pirate.previous_changes.key?('parrot_id')
- assert !pirate.previous_changes.key?('created_on')
end
private