Skip to content

Commit ff94ac5

Browse files
committed
add test to cover parsed with errors case
1 parent dd16142 commit ff94ac5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

+10
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ class DefaultContextFactoryTest {
2323
assertThat(result).resultsInNotApplicable()
2424
}
2525

26+
@Test
27+
fun `OPEN API -- Openapi property is expected to be String according to the OpenAPI3 spec`() {
28+
@Language("YAML")
29+
val content = """
30+
openapi: {la: 3.0.0}
31+
"""
32+
val result = defaultContextFactory.parseOpenApiContext(content)
33+
assertThat(result).resultsInParsedWithErrors()
34+
}
35+
2636
@Test
2737
fun `OPEN API -- not applicable when content does not contain the openapi property`() {
2838
@Language("YAML")

0 commit comments

Comments
 (0)