From 083810f1f12153e64117f8de964116ab0e5fc6af Mon Sep 17 00:00:00 2001 From: ktsypkina Date: Mon, 4 Mar 2024 12:50:33 +0100 Subject: [PATCH] add expected violation to test assert --- .../org/zalando/zally/core/DefaultContextFactoryTest.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt b/server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt index 071fc25f7..ba20f2f9c 100644 --- a/server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt +++ b/server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt @@ -30,7 +30,12 @@ class DefaultContextFactoryTest { openapi: {la: 3.0.0} """ val result = defaultContextFactory.parseOpenApiContext(content) - assertThat(result).resultsInParsedWithErrors() + assertThat(result).resultsInErrors( + Violation( + description = "attribute openapi is not of type `string`", + pointer = JsonPointer.empty() + ) + ) } @Test