diff --git a/src/test/java/core_service/modules/library/api/LibraryControllerStatsTest.java b/src/test/java/core_service/modules/library/api/LibraryControllerStatsTest.java index d0ebff5..560622a 100644 --- a/src/test/java/core_service/modules/library/api/LibraryControllerStatsTest.java +++ b/src/test/java/core_service/modules/library/api/LibraryControllerStatsTest.java @@ -15,6 +15,7 @@ import org.springframework.dao.DataIntegrityViolationException; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.system.CapturedOutput; import org.springframework.boot.test.system.OutputCaptureExtension; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc; import org.springframework.test.web.servlet.MockMvc; @@ -55,9 +56,13 @@ class LibraryControllerStatsTest extends AbstractMockedLibraryServicesTest { @Autowired private GameTimeToBeatRepository gameTimeToBeatRepository; + @Autowired + private JdbcTemplate jdbc; + @BeforeEach void seed() { userGameRepository.deleteAll(); + jdbc.update("delete from user_game_playtime_day where user_id = ?", USER_ID); steamGameRepository.saveAll(List.of( new SteamGame(220L, "Half-Life 2", null, Instant.now()), new SteamGame(620L, "Portal 2", null, Instant.now())));