LeoColman
07/19/2020, 3:58 AMwithTestApplication {
handleRequest(Get, "/xx").response.content shouldContain "yyy"
}
doesn't seem to work for
class Server : Kotless() {
override fun prepare(app: Application) {
app.routing {
static("/") {
resource("/xx", "yy.html")
}
}
}
}
What am I missing?withTestApplication {
Server().prepare(this.application)
handleRequest(Get, "/xx").response.content shouldContain "yy"
}
is that the correct way?TanVD
07/19/2020, 8:25 AM