From 9bdc22fac64efe7868996b06bce20e1c366fd113 Mon Sep 17 00:00:00 2001
From: haonase06089 <40634213+haonase06089@users.noreply.github.com>
Date: Fri, 24 Apr 2020 14:31:50 +0700
Subject: [PATCH] fix test case user service

---
 .../business/validation/UserValidation.java                     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/capstone/lip/landinformationportal/business/validation/UserValidation.java b/src/main/java/capstone/lip/landinformationportal/business/validation/UserValidation.java
index 358be4d9..c59aafc9 100644
--- a/src/main/java/capstone/lip/landinformationportal/business/validation/UserValidation.java
+++ b/src/main/java/capstone/lip/landinformationportal/business/validation/UserValidation.java
@@ -19,7 +19,7 @@ public String isValidUser(User user) {
 		if (!user.getUserStatus().equals(UserStatusConstant.ACTIVE) && !user.getUserStatus().equals(UserStatusConstant.BAN)) {
 			return "status is invalid";
 		}
-		if (user.getGender() != null && !user.getGender().equals(UserGenderConstant.OTHER) && !user.getGender().equals(UserGenderConstant.MALE) && !user.getGender().equals(UserGenderConstant.FEMALE)){
+		if (user.getGender() != null && !user.getGender().equals(UserGenderConstant.OTHER) && !user.getGender().equals(UserGenderConstant.MALE) && !user.getGender().equals(UserGenderConstant.FEMALE) && !user.getGender().isEmpty()){
 			return "gender is invalid";
 		}
 		if (!isEmptyString(user.getFullName()).isEmpty()) {