|
6 | 6 | import devkor.ontime_back.ControllerTestSupport; |
7 | 7 | import devkor.ontime_back.TestSecurityConfig; |
8 | 8 | import devkor.ontime_back.dto.*; |
| 9 | +import devkor.ontime_back.entity.DoneStatus; |
9 | 10 | import jakarta.servlet.http.HttpServletRequest; |
10 | 11 | import org.junit.jupiter.api.DisplayName; |
11 | 12 | import org.junit.jupiter.api.Test; |
@@ -42,8 +43,8 @@ void getPeriodSchedule_success() throws Exception { |
42 | 43 | LocalDateTime endDate = LocalDateTime.of(2024, 11, 18, 20, 0); |
43 | 44 |
|
44 | 45 | List<ScheduleDto> mockSchedules = List.of( |
45 | | - new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, startDate, 5, "늦으면 안됨", 2), |
46 | | - new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "중식당"), "가족행사", 15, startDate.plusHours(2), 10, "생신", 0) |
| 46 | + new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, startDate, 5, "늦으면 안됨", 2, DoneStatus.NORMAL), |
| 47 | + new ScheduleDto(UUID.randomUUID(), new PlaceDto(UUID.randomUUID(), "중식당"), "가족행사", 15, startDate.plusHours(2), 10, "생신", 0, DoneStatus.NORMAL) |
47 | 48 | ); |
48 | 49 | when(userAuthService.getUserIdFromToken(any(HttpServletRequest.class))).thenReturn(userId); |
49 | 50 | when(scheduleService.showSchedulesByPeriod(userId, startDate, endDate)).thenReturn(mockSchedules); |
@@ -74,7 +75,7 @@ void getScheduleById_success() throws Exception { |
74 | 75 | Long userId = 1L; |
75 | 76 | UUID scheduleId = UUID.randomUUID(); |
76 | 77 |
|
77 | | - ScheduleDto mockSchedule = new ScheduleDto(scheduleId, new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, LocalDateTime.of(2024, 11, 15, 18, 0), 5, "늦으면 안됨", 2); |
| 78 | + ScheduleDto mockSchedule = new ScheduleDto(scheduleId, new PlaceDto(UUID.randomUUID(), "과학도서관"), "공부하기", 10, LocalDateTime.of(2024, 11, 15, 18, 0), 5, "늦으면 안됨", 2, DoneStatus.NOT_ENDED); |
78 | 79 |
|
79 | 80 | when(userAuthService.getUserIdFromToken(any(HttpServletRequest.class))).thenReturn(userId); |
80 | 81 | when(scheduleService.showScheduleByScheduleId(userId, scheduleId)).thenReturn(mockSchedule); |
|
0 commit comments