提交 a843d54d 编写于 作者: Z Zuhao Wan

Include fixtures to prevent foreign key violation.

上级 84b9cc0a
......@@ -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.
先完成此消息的编辑!
想要评论请 注册