You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I am using the deletion strategy in request testing. With the transaction strategy, I cannot access the models that the controller creates during the test (possibly because it's in a different thread?).
The models created during the test have an after_commit callback set, which includes a process to delete the index from Elasticsearch when the model is deleted. However, database_cleaner does perform the deletion but it does not call the after_commit callback.
Currently, I am using the deletion strategy in request testing. With the transaction strategy, I cannot access the models that the controller creates during the test (possibly because it's in a different thread?).
The models created during the test have an after_commit callback set, which includes a process to delete the index from Elasticsearch when the model is deleted. However, database_cleaner does perform the deletion but it does not call the after_commit callback.
database_cleaner-active_record/lib/database_cleaner/active_record/deletion.rb
Line 26 in 1b4b478
How can I get the after_commit callback to be called, or make the request test work with the transaction strategy?
Thank you.
The text was updated successfully, but these errors were encountered: