Skip to content
Browse files

Include fixtures to prevent foreign key violation.

  • Loading branch information...
1 parent 84b9cc0 commit a843d54dd22e789642ac666452b92428c217bc07 @zuhao zuhao committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 activerecord/test/cases/associations/belongs_to_associations_test.rb
View
2 activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -937,6 +937,8 @@ def test_reflect_the_most_recent_change
end
class BelongsToWithForeignKeyTest < ActiveRecord::TestCase
+ fixtures :authors, :author_addresses
+
def test_destroy_linked_models
address = AuthorAddress.create!
author = Author.create! name: "Author", author_address_id: address.id

0 comments on commit a843d54

Please sign in to comment.
Something went wrong with that request. Please try again.