18 lines
445 B
Kotlin
18 lines
445 B
Kotlin
|
package fi.schro
|
||
|
|
||
|
import io.ktor.http.*
|
||
|
import kotlin.test.*
|
||
|
import io.ktor.server.testing.*
|
||
|
import fi.schro.routing.*
|
||
|
|
||
|
class ApplicationTest {
|
||
|
@Test
|
||
|
fun testRoot() {
|
||
|
withTestApplication({ configureRouting() }) {
|
||
|
handleRequest(HttpMethod.Get, "/").apply {
|
||
|
assertEquals(HttpStatusCode.OK, response.status())
|
||
|
assertEquals("Hello World!", response.content)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|