Skip to content

Commit

Permalink
Test checkCode
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Jun 24, 2024
1 parent bde052a commit c408258
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/kotlin/com/vonage/client/kt/AbstractTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/test/kotlin/com/vonage/client/kt/VerifyTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit c408258

Please sign in to comment.