Skip to content

Commit dd16142

Browse files
committed
add test of ObjectMapper failure on non parsable context
1 parent 5791339 commit dd16142

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ class DefaultContextFactoryTest {
1414
// OPEN API
1515
//
1616

17+
@Test
18+
fun `OPEN API -- not applicable when content is a String without any properties`() {
19+
@Language("YAML")
20+
val content = "Pets API".trimIndent()
21+
val result = defaultContextFactory.parseOpenApiContext(content)
22+
23+
assertThat(result).resultsInNotApplicable()
24+
}
25+
1726
@Test
1827
fun `OPEN API -- not applicable when content does not contain the openapi property`() {
1928
@Language("YAML")

0 commit comments

Comments
 (0)