Tucker Barbour
11/20/2019, 1:11 PM@Test
fun test() = withTestApplication(Application::main) {
val service = mockk<Service>()
declare {
single<Service> { service }
}
with(handleRequest(HttpMethod.Get, "/")) {
assertThat(response.status()).isEqualTo(HttpStatusCode.OK)
verify(exactly = 1) { service.call(any()) }
}
}