Allow beginTransaction and rollbackTransaction calls. #956
Labels
api
Related to library's API
duplicate
This issue or pull request already exists
enhancement
New feature or request
This is useful for unit tests that use the DB reference as a dependency injection on models.
By calling beginTransaction on setups and rollbacks on teardown, we can simulate an isolated sandbox environment for the database.
This would be similar to ecto where the death(?) of the process indicate the rollback. Since we can't rely on the many test runners to manage that, the easiest would be if one could call the functions manually and making sure that
db
is in a transaction during each test.The text was updated successfully, but these errors were encountered: