Skip to content

Commit 4d0addd

Browse files
committed
Update unit tests
1 parent 730cfb0 commit 4d0addd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/BraintreeCard/CreditCardPOSTBody.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ struct CreditCardPOSTBody: Encodable {
2121
sessionId: String
2222
) {
2323
self.creditCard = CreditCard(card: card)
24-
self.authenticationInsight = card.authenticationInsightRequested
25-
self.merchantAccountId = card.merchantAccountID
24+
25+
if card.authenticationInsightRequested {
26+
self.authenticationInsight = card.authenticationInsightRequested
27+
self.merchantAccountId = card.merchantAccountID
28+
}
2629

2730
self.meta = Meta(
2831
integration: integration,

UnitTests/BraintreeCardTests/BTCardClient_Tests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class BTCardClient_Tests: XCTestCase {
7979

8080
guard let parameters = params as? CreditCardPOSTBody else { return }
8181

82+
// Nil is correct
8283
XCTAssertNil(parameters.authenticationInsight)
8384
XCTAssertNil(parameters.merchantAccountId)
8485

0 commit comments

Comments
 (0)