aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/locking_test.rb7
-rw-r--r--activerecord/test/schema/schema.rb2
2 files changed, 4 insertions, 5 deletions
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb
index a8fb3548f6..5c59ab3187 100644
--- a/activerecord/test/cases/locking_test.rb
+++ b/activerecord/test/cases/locking_test.rb
@@ -230,16 +230,16 @@ class OptimisticLockingTest < ActiveRecord::TestCase
def test_polymorphic_destroy_with_dependencies_and_lock_version
car = Car.create!
-
+
assert_difference 'car.wheels.count' do
car.wheels << Wheel.create!
- end
+ end
assert_difference 'car.wheels.count', -1 do
car.destroy
end
assert car.destroyed?
end
-
+
def test_removing_has_and_belongs_to_many_associations_upon_destroy
p = RichPerson.create!
p.treasures.create!
@@ -248,7 +248,6 @@ class OptimisticLockingTest < ActiveRecord::TestCase
assert p.treasures.empty?
assert RichPerson.connection.select_all("SELECT * FROM peoples_treasures WHERE rich_person_id = 1").empty?
end
-
end
class OptimisticLockingWithSchemaChangeTest < ActiveRecord::TestCase
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 04c20c9128..377fde5c96 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -469,7 +469,7 @@ ActiveRecord::Schema.define do
t.references :best_friend_of
t.timestamps
end
-
+
create_table :peoples_treasures, :id => false, :force => true do |t|
t.column :rich_person_id, :integer
t.column :treasure_id, :integer