From c408258714628563f56984324681e27bfdeeb7a8 Mon Sep 17 00:00:00 2001 From: Sina Madani Date: Tue, 25 Jun 2024 00:39:10 +0100 Subject: [PATCH] Test checkCode --- src/test/kotlin/com/vonage/client/kt/AbstractTest.kt | 2 +- src/test/kotlin/com/vonage/client/kt/VerifyTest.kt | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt b/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt index dbba710..9a8bff6 100644 --- a/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt +++ b/src/test/kotlin/com/vonage/client/kt/AbstractTest.kt @@ -126,7 +126,7 @@ abstract class AbstractTest { if (expectedBody != null) { body = ObjectMapper().writeValueAsString(expectedBody) - header = "Content-Type" to "application/json" + header = "Content-Type" to ContentType.APPLICATION_JSON.mime } } diff --git a/src/test/kotlin/com/vonage/client/kt/VerifyTest.kt b/src/test/kotlin/com/vonage/client/kt/VerifyTest.kt index cc9fdea..0d8ce8b 100644 --- a/src/test/kotlin/com/vonage/client/kt/VerifyTest.kt +++ b/src/test/kotlin/com/vonage/client/kt/VerifyTest.kt @@ -105,4 +105,13 @@ class VerifyTest : AbstractTest() { mockJsonJwtPost("$baseUrl/$requestId/next-workflow") verifyClient.nextWorkflow(requestId) } + + @Test + fun `check code`() { + val code = "1228864" + mockJsonJwtPost("$baseUrl/$requestId", + expectedRequestParams = mapOf("code" to code) + ) + verifyClient.checkVerificationCode(requestId, code) + } } \ No newline at end of file