mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-16 20:20:59 +01:00
failing test when the newLogin fails
This commit is contained in:
parent
fe28496cba
commit
4d43b6e31f
@ -36,6 +36,7 @@ import app.dapk.st.olm.OlmWrapper
|
|||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.serialization.encodeToString
|
import kotlinx.serialization.encodeToString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
import org.amshove.kluent.fail
|
||||||
import test.impl.InMemoryDatabase
|
import test.impl.InMemoryDatabase
|
||||||
import test.impl.InMemoryPreferences
|
import test.impl.InMemoryPreferences
|
||||||
import test.impl.InstantScheduler
|
import test.impl.InstantScheduler
|
||||||
@ -257,8 +258,12 @@ class TestMatrix(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun newlogin() {
|
suspend fun newlogin() {
|
||||||
client.authService()
|
val result = client.authService()
|
||||||
.login(AuthService.LoginRequest(user.roomMember.id.value, user.password, null))
|
.login(AuthService.LoginRequest(user.roomMember.id.value, user.password, null))
|
||||||
|
|
||||||
|
if (result !is AuthService.LoginResult.Success) {
|
||||||
|
fail("Login failed: $result")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun restoreLogin() {
|
suspend fun restoreLogin() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user