mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix test
This commit is contained in:
parent
f88c86c799
commit
aee4ad2d3f
2 changed files with 8 additions and 6 deletions
|
@ -75,7 +75,7 @@
|
||||||
<string name="action_display">Display</string>
|
<string name="action_display">Display</string>
|
||||||
<string name="action_display_grid">Grid</string>
|
<string name="action_display_grid">Grid</string>
|
||||||
<string name="action_display_list">List</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_set_filter">Set filter</string>
|
||||||
<string name="action_cancel">Cancel</string>
|
<string name="action_cancel">Cancel</string>
|
||||||
<string name="action_sort">Sort</string>
|
<string name="action_sort">Sort</string>
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.os.Build
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner
|
import eu.kanade.tachiyomi.CustomRobolectricGradleTestRunner
|
||||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
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.SourceManager
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
|
@ -85,7 +85,7 @@ class LibraryUpdateServiceTest {
|
||||||
fun testContinuesUpdatingWhenAMangaFails() {
|
fun testContinuesUpdatingWhenAMangaFails() {
|
||||||
var favManga = createManga("/manga1", "/manga2", "/manga3")
|
var favManga = createManga("/manga1", "/manga2", "/manga3")
|
||||||
service.db.insertMangas(favManga).executeAsBlocking()
|
service.db.insertMangas(favManga).executeAsBlocking()
|
||||||
favManga = service.db.getFavoriteMangas().executeAsBlocking()
|
favManga = service.db.getLibraryMangas().executeAsBlocking()
|
||||||
|
|
||||||
val chapters = createChapters("/chapter1", "/chapter2")
|
val chapters = createChapters("/chapter1", "/chapter2")
|
||||||
val chapters3 = createChapters("/achapter1", "/achapter2")
|
val chapters3 = createChapters("/achapter1", "/achapter2")
|
||||||
|
@ -116,10 +116,12 @@ class LibraryUpdateServiceTest {
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createManga(vararg urls: String): List<Manga> {
|
private fun createManga(vararg urls: String): List<LibraryManga> {
|
||||||
val list = ArrayList<Manga>()
|
val list = ArrayList<LibraryManga>()
|
||||||
for (url in urls) {
|
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
|
m.favorite = true
|
||||||
list.add(m)
|
list.add(m)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue