提交 6f8cc2eb 编写于 作者: R Rafael Mendonça França

Merge pull request #16094 from zuhao/refactor_activerecord_belongs_to_associations_test

Include fixtures to prevent foreign key violation.
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册