Fix bad check in test