Skip to content

Commit

Permalink
Add comment about x-key in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djoksimo committed Jun 12, 2024
1 parent 37ee372 commit 9cb2565
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class RosettaPinSubmitterTest() : MockServerSuite() {
}

@Test
fun `Basis Theory responds with a malformed error`() = runTest {
fun `Rosetta responds with a malformed error`() = runTest {
val paymentRef = "xyzMalformedError456"
server.givenRosettaPaymentCaptureRequest(paymentRef).returnsMalformedError()

Expand Down Expand Up @@ -242,6 +242,12 @@ class RosettaPinSubmitterTest() : MockServerSuite() {
val path = buildMockPaymentCapturePath(paymentRef)

return VaultProxyRequest.emptyRequest()
/**
* we emulate the behavior of the x-key header being set by the
* [com.joinforage.forage.android.core.services.vault.AbstractVaultSubmitter]
* But the x-key header is not applicable to Rosetta client
* and is omitted via [RosettaPinSubmitter.parseEncryptionKey]
*/
.setHeader(ForageConstants.Headers.X_KEY, "22320ce0-1a3c-4c64-970c-51ed7db34548")
.setHeader(ForageConstants.Headers.MERCHANT_ACCOUNT, mockData.merchantId)
.setHeader(ForageConstants.Headers.IDEMPOTENCY_KEY, MOCK_IDEMPOTENCY_KEY)
Expand Down

0 comments on commit 9cb2565

Please sign in to comment.