Check that the api is being used rather than the db
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
davidoskky 2022-09-10 09:37:14 +02:00
parent 5853a19937
commit 60c24fc75a

View File

@ -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()}
}
}