SelectOptions unit test to check JUnit label is correct.
Related to
@@ -4,12 +4,15 @@ import io.micronaut.http.HttpResponse
import io.micronaut.http.annotation.Get
import io.micronaut.http.client.annotation.Client
import io.micronaut.starter.api.SelectOptionsDTO
+import io.micronaut.starter.api.TestFrameworkDTO
import io.micronaut.starter.application.ApplicationType
+import io.micronaut.starter.feature.test.Junit
import io.micronaut.starter.options.BuildTool
import io.micronaut.starter.options.JdkVersion
import io.micronaut.starter.options.Language
import io.micronaut.starter.options.TestFramework
import io.micronaut.test.extensions.spock.annotation.MicronautTest
+import spock.lang.Issue
import spock.lang.Specification
import javax.inject.Inject
@@ -102,6 +105,17 @@ class SelectOptionsTest extends Specification {
}
}
+ @Issue("https://github.com/micronaut-projects/micronaut-starter-ui/issues/42")
+ void 'SelectOption label of JUNIT is JUnit, not Junit'() {
+ when: "We ask for the options"
+ SelectOptionsDTO selectOptions = client.selectOptions().body()
+
+ then:
+ TestFrameworkDTO junit = selectOptions.test.options.find {it.value == TestFramework.JUNIT}
+ junit.label == 'JUnit'
+ junit.description == 'JUnit'
+ }
+
@Client('/select-options')
static interface SelectOptionsClient {
@Get('/')
