When doing unit tests on models and methods / functions of modifying a database, what is the best methodology or thinking for unit testing? For example, the publish function in the model has no test behavior, except for pass / fail, and in the case of transfer, it changes the database. Best practice or approach?
My current thoughts are to mirror the current database before testing and just change the database selection in my unit test file. Thank you for your suggestions.
source
share