diff --git a/src/main/java/com/diareat/diareat/user/service/UserService.java b/src/main/java/com/diareat/diareat/user/service/UserService.java index 866aa3d..2ce3bee 100644 --- a/src/main/java/com/diareat/diareat/user/service/UserService.java +++ b/src/main/java/com/diareat/diareat/user/service/UserService.java @@ -25,7 +25,7 @@ public class UserService { // 회원정보 저장 @Transactional public Long saveUser(CreateUserDto createUserDto) { - BaseNutrition baseNutrition = BaseNutrition.createNutrition(0, 0, 0, 0); // 로직 확정 전에는 임시 코드로 대체 + BaseNutrition baseNutrition = BaseNutrition.createNutrition(2000, 300, 80, 80); // BaseNutrition baseNutrition = BaseNutrition.createNutrition(createUserDto.getGender(), createUserDto.getAge(), createUserDto.getHeight(), createUserDto.getWeight()); User user = User.createUser(createUserDto.getName(), createUserDto.getKeyCode(), createUserDto.getHeight(), createUserDto.getWeight(), createUserDto.getGender(), createUserDto.getAge(), baseNutrition); return userRepository.save(user).getId(); diff --git a/src/test/java/com/diareat/diareat/service/UserServiceTest.java b/src/test/java/com/diareat/diareat/service/UserServiceTest.java index 0fdce53..7d2ec45 100644 --- a/src/test/java/com/diareat/diareat/service/UserServiceTest.java +++ b/src/test/java/com/diareat/diareat/service/UserServiceTest.java @@ -99,7 +99,7 @@ void getUserNutrition() { // 임시 코드 사용, 추후 로직 개편 시 테 ResponseUserNutritionDto responseUserNutritionDto = userService.getUserNutrition(userId); // then - assertEquals(0, responseUserNutritionDto.getCalorie()); + assertEquals(2000, responseUserNutritionDto.getCalorie()); } @Test