Skip to content

Commit

Permalink
Remove unneded tests.
Browse files Browse the repository at this point in the history
Before 7f4b0a1231bf3c65db2ad4066da78c3da5ffb01, this test are asserting
that update_attribute does the dirty tracking. Since we remove this
method and update_column write in the database directly this tests will
always fail>
  • Loading branch information
rafaelfranca committed Jun 14, 2012
1 parent 508834c commit 46a2917
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions activerecord/test/cases/dirty_test.rb
Expand Up @@ -78,7 +78,7 @@ def test_time_attributes_changes_with_time_zone
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)
Expand Down Expand Up @@ -496,16 +496,6 @@ def test_previous_changes
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

if ActiveRecord::Base.connection.supports_migrations?
Expand Down

0 comments on commit 46a2917

Please sign in to comment.