Add unit tests for user model