Permalink
Browse files

fix test

Conflicts:
	activerecord/test/cases/locking_test.rb
  • Loading branch information...
1 parent 7240202 commit 1edd358177b718c969b41d6cb58c8f229f72d500 @jonleighton jonleighton committed with carlosantoniodasilva Mar 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/test/cases/locking_test.rb
@@ -7,6 +7,7 @@
require 'models/legacy_thing'
require 'models/reference'
require 'models/string_key_object'
+require 'models/treasure'
class LockWithoutDefault < ActiveRecord::Base; end
@@ -267,16 +268,15 @@ def test_original_locking_column
assert_equal "omg", k.original_locking_column
end
end
-
+
def test_removing_has_and_belongs_to_many_associations_upon_destroy
- p = RichPerson.create!
+ p = RichPerson.create! :first_name => 'Jon'
p.treasures.create!
assert !p.treasures.empty?
p.destroy
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

0 comments on commit 1edd358

Please sign in to comment.