diff options
author | Zuhao Wan <wanzuhao@gmail.com> | 2014-07-09 00:04:14 +0800 |
---|---|---|
committer | Zuhao Wan <wanzuhao@gmail.com> | 2014-07-09 00:04:14 +0800 |
commit | a843d54dd22e789642ac666452b92428c217bc07 (patch) | |
tree | fb38513352e1fd61e5cc4ba522592d80e3950909 /activerecord | |
parent | 84b9cc0a2bdb4aa20a6ecf6cc9344efa779e2139 (diff) | |
download | rails-a843d54dd22e789642ac666452b92428c217bc07.tar.gz rails-a843d54dd22e789642ac666452b92428c217bc07.tar.bz2 rails-a843d54dd22e789642ac666452b92428c217bc07.zip |
Include fixtures to prevent foreign key violation.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/belongs_to_associations_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb index c9bdfb88ae..25555bd75c 100644 --- a/activerecord/test/cases/associations/belongs_to_associations_test.rb +++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb @@ -937,6 +937,8 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase 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 |