Helio
01/15/2021, 11:06 PMHelio
01/17/2021, 9:27 PMHelio
01/17/2021, 9:35 PMexpectSuccess = false
.
cc: @christophsturm. (Apologies for mentioning you, but I thought you would like to know how I fixed it.
private fun mockHttpErrorResponse(httpStatusCode: HttpStatusCode): HttpResponse {
val client = HttpClient(MockEngine) {
expectSuccess = false
engine {
addHandler {
respondError(httpStatusCode)
}
}
}
return runBlocking { client.get() }
}