Skip to content

Commit

Permalink
fix: DateUtilTest being year dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesserli committed Oct 2, 2023
1 parent 945f039 commit c1ee480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/nu/peg/svmeal/util/DateUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ void handlesYearChangesCorrectly() {

@Test
void bugInvalidYearIfFirstDateIsBeforeToday() {
LocalDate bugDate = LocalDate.of(2022, 12, 16);
final LocalDate now = LocalDate.now();
LocalDate bugDate = LocalDate.of(now.getYear(), 12, 16);

final var sequence =
Stream.generate(DateUtil.dateSequenceGenerator(bugDate.minusDays(1))).limit(5).toList();
Expand Down

0 comments on commit c1ee480

Please sign in to comment.