Fixed test helper to properly create and tear down db on integration tests