refactors tests, correct test database