diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2017-08-24 15:47:20 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2017-08-24 15:49:11 +0000 |
commit | 46e997430a857eb265739e5891aa34c7e8cfbea2 (patch) | |
tree | e791c9859018e41f4c2bb82b1a2eeece74e742ed /activerecord/test | |
parent | 9de6c6c91c715b2c7b4a566b5d350e25936bdc78 (diff) | |
download | rails-46e997430a857eb265739e5891aa34c7e8cfbea2.tar.gz rails-46e997430a857eb265739e5891aa34c7e8cfbea2.tar.bz2 rails-46e997430a857eb265739e5891aa34c7e8cfbea2.zip |
Address `test_after_save_callback_with_autosave` failure
when other `AutomaticInverseFindingTests` load `:comments` fixture
but does not load `:posts`.
Refer #30385 for similar issue
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index ae492f1c1c..da5e830ebc 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1724,6 +1724,10 @@ class TestAutosaveAssociationOnAHasManyAssociationWithInverse < ActiveRecord::Te end end + def setup + Comment.delete_all + end + def test_after_save_callback_with_autosave post = Post.new(title: "Test", body: "...") comment = post.comments.build(body: "...") |