Refactor LibraryUpdateService a bit for future changes

(cherry picked from commit b5c2934270)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt
This commit is contained in:
arkon
2021-03-14 16:08:00 -04:00
committed by Jobobby04
parent e31e71ad44
commit 9aca115977
2 changed files with 43 additions and 33 deletions
@@ -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)