22 lines
541 B
Kotlin
22 lines
541 B
Kotlin
package com.kmlabz.birbnetes
|
|
|
|
import io.ktor.application.*
|
|
import io.ktor.response.*
|
|
import io.ktor.request.*
|
|
import io.ktor.routing.*
|
|
import io.ktor.http.*
|
|
import kotlin.test.*
|
|
import io.ktor.server.testing.*
|
|
|
|
class ApplicationTest {
|
|
@Test
|
|
fun testRoot() {
|
|
withTestApplication({ module(testing = true) }) {
|
|
handleRequest(HttpMethod.Get, "/").apply {
|
|
assertEquals(HttpStatusCode.OK, response.status())
|
|
assertEquals("HELLO WORLD!", response.content)
|
|
}
|
|
}
|
|
}
|
|
}
|