christophsturm
04/14/2021, 9:08 PMval context = describe("ktor") {
it("routing works") {
val server = TestApplicationEngine(environment = createTestEnvironment {
module {
routing {
route("/x") {
route("/y") {
get {}
}
}
}
}
}) {}.apply { start() }
expectThat(server.handleRequest(HttpMethod.Get, "/x/y").response.status()).isNotNull().get { isSuccess() }.isTrue()
}
}
dave08
04/16/2021, 8:11 AMchristophsturm
04/16/2021, 8:32 AM