Integration Tests
Learn how to test the FlywayDatabaseMigrator and the repository.
We'll cover the following...
We'll cover the following...
Testing the FlywayDatabaseMigrator
To verify the basic behavior of our FlywayDatabaseMigrator, we write a simple test.
We construct an invalid database configuration within this test and expect that the call to migrate throws an exception. Review lines 3–8. If you remember, we had this issue already and chose not to handle any exceptions but let the calling site do this, for example, via a MonadError instance.
The other two tests are also quite simple: we just expect them to return either zero or the ...