From 9f13213a35f4424bf2cbd672519883d1f1701bf9 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Sat, 27 Mar 2021 21:57:53 +0100 Subject: [PATCH] Fix error text when openapi definition was not found --- src/test/kotlin/integration/steps/then/schema.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/integration/steps/then/schema.kt b/src/test/kotlin/integration/steps/then/schema.kt index bde3e69..0b1ceb2 100644 --- a/src/test/kotlin/integration/steps/then/schema.kt +++ b/src/test/kotlin/integration/steps/then/schema.kt @@ -63,8 +63,9 @@ fun TestApplicationResponse.`And the schema response body must be valid`(content val schema = response.getContentMediaType(contentType.toString())?.schema if (content != null) { + val httpMethod = call.request.httpMethod.value schema?.validate(api, responseContent) - ?: fail("""No Status "${status.value}" found with media type "$contentType" for "$this $uri".""") + ?: fail("""No Status "${status.value}" found with media type "$contentType" for "$httpMethod $uri".""") } } }