Phase 1 work
This commit is contained in:
@@ -12,19 +12,19 @@ import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class ApplicationTest {
|
||||
|
||||
@Test
|
||||
fun `health endpoint returns 200 with status ok`() = testApplication {
|
||||
application {
|
||||
install(ContentNegotiation) {
|
||||
json()
|
||||
fun `health endpoint returns 200 with status ok`() =
|
||||
testApplication {
|
||||
application {
|
||||
install(ContentNegotiation) {
|
||||
json()
|
||||
}
|
||||
configureRouting()
|
||||
}
|
||||
configureRouting()
|
||||
val response = client.get("/health")
|
||||
assertEquals(HttpStatusCode.OK, response.status)
|
||||
val body = response.bodyAsText()
|
||||
assertTrue(body.contains("\"status\""), "expected body to contain status field, was: $body")
|
||||
assertTrue(body.contains("\"ok\""), "expected body to contain ok value, was: $body")
|
||||
}
|
||||
val response = client.get("/health")
|
||||
assertEquals(HttpStatusCode.OK, response.status)
|
||||
val body = response.bodyAsText()
|
||||
assertTrue(body.contains("\"status\""), "expected body to contain status field, was: $body")
|
||||
assertTrue(body.contains("\"ok\""), "expected body to contain ok value, was: $body")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user