refactor user model test