unit tests for user model