Test refresh login information
This commit is contained in:
parent
f46f98cef0
commit
3f0a3903ae
@ -680,6 +680,18 @@ class RepositoryTest() {
|
|||||||
coVerify(exactly = 0) { api.login() }
|
coVerify(exactly = 0) { api.login() }
|
||||||
assertSame(false, response)
|
assertSame(false, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `refresh login information`() {
|
||||||
|
coEvery { api.refreshLoginInformation() } returns Unit
|
||||||
|
coEvery { appSettingsService.refreshLoginInformation(any(), any(), any()) } returns Unit
|
||||||
|
|
||||||
|
val repository = Repository(api, appSettingsService, connectivityStatus, db)
|
||||||
|
repository.refreshLoginInformation("https://test.com/selfoss/", "login", "password")
|
||||||
|
|
||||||
|
coVerify(exactly = 1) { api.refreshLoginInformation() }
|
||||||
|
coVerify(exactly = 1) {appSettingsService.refreshLoginInformation("https://test.com/selfoss/", "login", "password")}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun generateTestDBItems(item : FakeItemParameters = FakeItemParameters()) : List<ITEM> {
|
fun generateTestDBItems(item : FakeItemParameters = FakeItemParameters()) : List<ITEM> {
|
||||||
|
Loading…
Reference in New Issue
Block a user