wrote tests for user model