Add tests to admin functions