dave08
03/12/2019, 1:36 PM// This passes
@Test
fun testSimpleRequest() = withTestApplication(Application::testAppModule) {
with(handleRequest(HttpMethod.Get, 9090, "/") {
}) {
assertEquals(HttpStatusCode.OK, response.status())
}
}
// This doesn't
@Test
fun testRequest() = withTestApplication(Application::testAppModule) {
with(handleRequest(<http://HttpMethod.Post|HttpMethod.Post>, 9090, "/restrictions") {
setBody(deviceRequestJson)
}) {
assertEquals(HttpStatusCode.OK, response.status())
assertEquals(responseRestrictionsJson, response.content)
}
}