Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jeffscottbrown/7cd7f2d941154333e59ca1c7f7ffc910 to your computer and use it in GitHub Desktop.

Select an option

Save jeffscottbrown/7cd7f2d941154333e59ca1c7f7ffc910 to your computer and use it in GitHub Desktop.
package com.te
import io.kotest.core.spec.style.BehaviorSpec
import io.kotest.matchers.shouldBe
import io.micronaut.http.client.HttpClient
import io.micronaut.http.client.annotation.Client
import io.micronaut.runtime.server.EmbeddedServer
import io.micronaut.test.extensions.kotest.annotation.MicronautTest
@MicronautTest
class HelloControllerTest(private val embeddedServer: EmbeddedServer, @Client("/") private val client: HttpClient) : BehaviorSpec({
given("a hello endpoint") {
`when`("we hit /hello") {
val resp: String = client.toBlocking().retrieve("/hello")
then("we should get back plain text with a spanish greeting") {
resp shouldBe "Hola!"
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment