aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorZuhao Wan <wanzuhao@gmail.com>2014-07-09 00:04:14 +0800
committerZuhao Wan <wanzuhao@gmail.com>2014-07-09 00:04:14 +0800
commita843d54dd22e789642ac666452b92428c217bc07 (patch)
treefb38513352e1fd61e5cc4ba522592d80e3950909 /activerecord/test
parent84b9cc0a2bdb4aa20a6ecf6cc9344efa779e2139 (diff)
downloadrails-a843d54dd22e789642ac666452b92428c217bc07.tar.gz
rails-a843d54dd22e789642ac666452b92428c217bc07.tar.bz2
rails-a843d54dd22e789642ac666452b92428c217bc07.zip
Include fixtures to prevent foreign key violation.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb2
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