mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:09:16 +01:00
Fix test
This commit is contained in:
parent
f88c86c799
commit
aee4ad2d3f
@ -75,7 +75,7 @@
|
||||
<string name="action_display">Display</string>
|
||||
<string name="action_display_grid">Grid</string>
|
||||
<string name="action_display_list">List</string>
|
||||
<string name="action_display_download_badge">Download Badges</string>
|
||||
<string name="action_display_download_badge">Download badges</string>
|
||||
<string name="action_set_filter">Set filter</string>
|
||||
<string name="action_cancel">Cancel</string>
|
||||
<string name="action_sort">Sort</string>
|
||||
|
@ -7,7 +7,7 @@ import android.os.Build
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner
|
||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
@ -85,7 +85,7 @@ class LibraryUpdateServiceTest {
|
||||
fun testContinuesUpdatingWhenAMangaFails() {
|
||||
var favManga = createManga("/manga1", "/manga2", "/manga3")
|
||||
service.db.insertMangas(favManga).executeAsBlocking()
|
||||
favManga = service.db.getFavoriteMangas().executeAsBlocking()
|
||||
favManga = service.db.getLibraryMangas().executeAsBlocking()
|
||||
|
||||
val chapters = createChapters("/chapter1", "/chapter2")
|
||||
val chapters3 = createChapters("/achapter1", "/achapter2")
|
||||
@ -116,10 +116,12 @@ class LibraryUpdateServiceTest {
|
||||
return list
|
||||
}
|
||||
|
||||
private fun createManga(vararg urls: String): List<Manga> {
|
||||
val list = ArrayList<Manga>()
|
||||
private fun createManga(vararg urls: String): List<LibraryManga> {
|
||||
val list = ArrayList<LibraryManga>()
|
||||
for (url in urls) {
|
||||
val m = Manga.create(url, url.substring(1))
|
||||
val m = LibraryManga()
|
||||
m.url = url
|
||||
m.title = url.substring(1)
|
||||
m.favorite = true
|
||||
list.add(m)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user