From aee4ad2d3fe392041f265255a91269b415c89ad5 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sun, 22 Oct 2017 18:58:31 +0200 Subject: [PATCH] Fix test --- app/src/main/res/values/strings.xml | 2 +- .../data/library/LibraryUpdateServiceTest.kt | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1f13c76d6..354af628d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -75,7 +75,7 @@ Display Grid List - Download Badges + Download badges Set filter Cancel Sort diff --git a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt index d75580647..a86e1f644 100644 --- a/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt +++ b/app/src/test/java/eu/kanade/tachiyomi/data/library/LibraryUpdateServiceTest.kt @@ -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 { - val list = ArrayList() + private fun createManga(vararg urls: String): List { + val list = ArrayList() 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) }