From 0920d4fccbfc41b6ccdae7070758fc2133280409 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 19 Apr 2013 16:57:06 +0100 Subject: Revert "Merge pull request #10183 from jholton/fix_association_auto_save" This reverts commit e8727d37fc49d5bf9976c3cb5c46badb92cf4ced, reversing changes made to d098e1c24bc145e0cc14532348436e14dc46d375. Reason: it broke the mysql build --- activerecord/test/cases/autosave_association_test.rb | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 552bbd3f52..536ff4882c 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -764,20 +764,6 @@ class TestDestroyAsPartOfAutosaveAssociation < ActiveRecord::TestCase assert_equal 2, @pirate.birds.reload.length end - def test_should_save_new_record_that_has_same_value_as_existing_record_marked_for_destruction_on_field_that_has_unique_index - Bird.connection.add_index :birds, :name, unique: true - - 3.times { |i| @pirate.birds.create(name: "birds_#{i}") } - - @pirate.birds[0].mark_for_destruction - @pirate.birds.build(name: @pirate.birds[0].name) - @pirate.save! - - assert_equal 3, @pirate.birds.reload.length - ensure - Bird.connection.remove_index :birds, column: :name - end - # Add and remove callbacks tests for association collections. %w{ method proc }.each do |callback_type| define_method("test_should_run_add_callback_#{callback_type}s_for_has_many") do -- cgit v1.2.3