diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-08 13:13:54 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-08 13:13:54 -0300 |
commit | 6f8cc2eb14f84b6895b555f6020289a029cf33ee (patch) | |
tree | fb38513352e1fd61e5cc4ba522592d80e3950909 /activerecord/test | |
parent | 84b9cc0a2bdb4aa20a6ecf6cc9344efa779e2139 (diff) | |
parent | a843d54dd22e789642ac666452b92428c217bc07 (diff) | |
download | rails-6f8cc2eb14f84b6895b555f6020289a029cf33ee.tar.gz rails-6f8cc2eb14f84b6895b555f6020289a029cf33ee.tar.bz2 rails-6f8cc2eb14f84b6895b555f6020289a029cf33ee.zip |
Merge pull request #16094 from zuhao/refactor_activerecord_belongs_to_associations_test
Include fixtures to prevent foreign key violation.
Diffstat (limited to 'activerecord/test')
-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 |