Skip to content

Commit 46e9974

Browse files
committed
Address test_after_save_callback_with_autosave failure
when other `AutomaticInverseFindingTests` load `:comments` fixture but does not load `:posts`. Refer rails#30385 for similar issue
1 parent 9de6c6c commit 46e9974

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activerecord/test/cases/autosave_association_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,10 @@ class Comment < ActiveRecord::Base
17241724
end
17251725
end
17261726

1727+
def setup
1728+
Comment.delete_all
1729+
end
1730+
17271731
def test_after_save_callback_with_autosave
17281732
post = Post.new(title: "Test", body: "...")
17291733
comment = post.comments.build(body: "...")

0 commit comments

Comments
 (0)