refactor user model tests