How I test it now: ``` @Test fun `ok result of...
# coroutines
a
How I test it now:
Copy code
@Test
    fun `ok result of registration results in success`() = blocking {
        val result = classToTest.execute(appConfig).await()
        mockRegisterResponseSuccess(ApiResponseStatus.OK)
        mockInitAppPurchasesSuccess()
        result.should.be.equal(trackingId)
    }
m
Try putting the
Deferred
into a local variable and waiting until you’ve fired the mocks before calling
await
on it
Otherwise you’re never firing the mocks because you’re stuck on the first line
g
+1 to Martin, this is exactly what I meant