Skip to content

Commit

Permalink
[fix] ExpenseServiceTest getMonthlyExpense 메서드 categoryId 추가에 대한 테스트 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JunRain2 committed Aug 17, 2024
1 parent 8f55597 commit 1a879d8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void getMonthlyExpense_Success() {
given(userRepository.findById(user.getId())).willReturn(Optional.of(user));

Category userCategory = Mockito.spy(Category.builder().build());
given(userCategory.getId()).willReturn(-1L);

LocalDate requestMonth = LocalDate.of(2024, 07, 8);
Pageable requestPage = PageRequest.of(0, pageSize);
Expand Down Expand Up @@ -120,6 +121,7 @@ private List<CompactExpenseResponseDto> generateCompactExpenseResponseList(Local
.expenseId((long)-i)
.expenseDate(month.withDayOfMonth(i).atStartOfDay())
.amount(i * 100000L)
.categoryId(-1L)
.build());
}
return compactExpenses;
Expand Down

0 comments on commit 1a879d8

Please sign in to comment.