The preceding test case gets an instance of our application and sends a get request on the specified URL, which in this is /, aka an index URL, and it checks if the status is OK - 200 and content is Hello readers!:
class ApplicationTest { @Test fun `check index page`() = withTestApplication(Application::main) { with(handleRequest(HttpMethod.Get, "/")) { assertEquals(HttpStatusCode.OK, response.status()) assertEquals("Hello readers!", response.content) } } }