wrote tests for user validation