Fix LibraryUpdateServiceTest so ./gradlew ... doesn't crash (#4821)

(cherry picked from commit 27f55f809873c65fcb73724b5d9b75c9d48ef3d0)
This commit is contained in:
Tooster 2021-04-12 14:35:00 +02:00 committed by Jobobby04
parent 3fb1b4affa
commit 0ac56750c8

View File

@ -98,9 +98,10 @@ class LibraryUpdateServiceTest {
`when`(source.fetchChapterList(favManga[2])).thenReturn(Observable.just(chapters3)) `when`(source.fetchChapterList(favManga[2])).thenReturn(Observable.just(chapters3))
val intent = Intent() val intent = Intent()
val categoryId = intent.getIntExtra(LibraryUpdateService.KEY_CATEGORY, -1)
val target = LibraryUpdateService.Target.CHAPTERS val target = LibraryUpdateService.Target.CHAPTERS
runBlocking { runBlocking {
service.addMangaToQueue(intent, target) service.addMangaToQueue(categoryId, target)
service.updateChapterList() service.updateChapterList()
// There are 3 network attempts and 2 insertions (1 request failed) // There are 3 network attempts and 2 insertions (1 request failed)