Add unit tests to User model