refactoring admin tests