From 60c24fc75af53619b2b8d60794dd8a3934e11b75 Mon Sep 17 00:00:00 2001 From: davidoskky Date: Sat, 10 Sep 2022 09:37:14 +0200 Subject: [PATCH] Check that the api is being used rather than the db --- .../apps/readerforselfossv2/repository/RepositoryTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt b/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt index 3a2a475..5981752 100644 --- a/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt +++ b/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt @@ -6,9 +6,7 @@ import bou.amine.apps.readerforselfossv2.model.SelfossModel import bou.amine.apps.readerforselfossv2.rest.SelfossApi import bou.amine.apps.readerforselfossv2.service.AppSettingsService import com.github.ln_12.library.ConnectivityStatus -import io.mockk.coEvery -import io.mockk.every -import io.mockk.mockk +import io.mockk.* import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.runBlocking import kotlin.test.BeforeTest @@ -64,6 +62,8 @@ class RepositoryTest() { } assertSame(repository.items.size, 1) + coVerify(exactly = 1) { api.getItems("unread", 0, null, null, null, null, any()) } + verify(exactly = 0) { db.itemsQueries.items().executeAsList()} } }