Skip to content

Commit d4be1a8

Browse files
committed
refactor(recruit-board): 모집글 생성 및 수정시 봉사 시작 종료 일시 제약 조건에 따른 LocalDateTimeFixture 수정
1 parent 74b6866 commit d4be1a8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/test/java/com/somemore/common/fixture/LocalDateTimeFixture.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ private LocalDateTimeFixture() {
88
}
99

1010
public static LocalDateTime createStartDateTime() {
11-
// 2024-11-25 T:13:00:00
12-
return LocalDateTime.of(2024, 11, 25, 13, 0);
11+
// 내일 날짜로 13:00:00으로 설정
12+
LocalDateTime today = LocalDateTime.now();
13+
return today.plusDays(1).withHour(13).withMinute(0).withSecond(0).withNano(0);
1314
}
1415

1516
public static LocalDateTime createUpdateStartDateTime() {
16-
// 2024-11-25 T:16:00:00
17-
return LocalDateTime.of(2024, 11, 25, 16, 0);
17+
// 내일 날짜로 16:00:00으로 설정
18+
LocalDateTime today = LocalDateTime.now();
19+
return today.plusDays(1).withHour(16).withMinute(0).withSecond(0).withNano(0);
1820
}
1921

2022
public static LocalDateTime createCurrentDateTime() {
21-
// 2024-11-24 T:18:00:00
22-
return LocalDateTime.of(2024, 11, 24, 18, 0);
23+
// 오늘 날짜로 16:00:00으로 설정
24+
LocalDateTime today = LocalDateTime.now();
25+
return today.withHour(16).withMinute(0).withSecond(0).withNano(0);
2326
}
2427

2528
}

0 commit comments

Comments
 (0)