Refactor LibraryUpdateService a bit for future changes

This commit is contained in:
arkon
2021-03-14 16:08:00 -04:00
parent 94f5117941
commit b5c2934270
2 changed files with 38 additions and 28 deletions

View File

@@ -100,7 +100,8 @@ class LibraryUpdateServiceTest {
val intent = Intent()
val target = LibraryUpdateService.Target.CHAPTERS
runBlocking {
service.updateChapterList(service.getMangaToUpdate(intent, target))
service.addMangaToQueue(intent, target)
service.updateChapterList()
// There are 3 network attempts and 2 insertions (1 request failed)
assertThat(service.db.getChapters(favManga[0]).executeAsBlocking()).hasSize(2)