Created
June 15, 2021 16:59
-
-
Save jeffscottbrown/7cd7f2d941154333e59ca1c7f7ffc910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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