refactored user to_s method and added user model test conditions