27 lines
661 B
Kotlin
27 lines
661 B
Kotlin
|
package dev.araozu
|
||
|
|
||
|
import io.ktor.application.*
|
||
|
import io.ktor.response.*
|
||
|
import io.ktor.request.*
|
||
|
import io.ktor.features.*
|
||
|
import io.ktor.routing.*
|
||
|
import io.ktor.http.*
|
||
|
import io.ktor.websocket.*
|
||
|
import io.ktor.http.cio.websocket.*
|
||
|
import java.time.*
|
||
|
import io.ktor.gson.*
|
||
|
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)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|