-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
217727f
commit 562a8e2
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,19 +29,19 @@ class PayPalClient_Tests: XCTestCase { | |
) | ||
|
||
func testUserAuthenticationIsPassed_returnsRequestEmail() async { | ||
let modifiedRequest = PayPalNativeCheckoutRequest(orderID: "fake-order-id", userAuthenticationEmail: "[email protected]") | ||
let mockPayPalDelegate = MockPayPalDelegate() | ||
payPalClient.delegate = mockPayPalDelegate | ||
await payPalClient.start(request: modifiedRequest) | ||
XCTAssertEqual(mockNativeCheckoutProvider.userAuthenticationEmail, "[email protected]") | ||
let modifiedRequest = PayPalNativeCheckoutRequest(orderID: "fake-order-id", userAuthenticationEmail: "[email protected]") | ||
let mockPayPalDelegate = MockPayPalDelegate() | ||
payPalClient.delegate = mockPayPalDelegate | ||
await payPalClient.start(request: modifiedRequest) | ||
XCTAssertEqual(mockNativeCheckoutProvider.userAuthenticationEmail, "[email protected]") | ||
} | ||
|
||
func testUserAuthenticationIsNil_returnsNilForEmail() async { | ||
let modifiedRequest = PayPalNativeCheckoutRequest(orderID: "fake-order-id") | ||
let mockPayPalDelegate = MockPayPalDelegate() | ||
payPalClient.delegate = mockPayPalDelegate | ||
await payPalClient.start(request: request) | ||
XCTAssertNil(mockNativeCheckoutProvider.userAuthenticationEmail) | ||
let modifiedRequest = PayPalNativeCheckoutRequest(orderID: "fake-order-id") | ||
let mockPayPalDelegate = MockPayPalDelegate() | ||
payPalClient.delegate = mockPayPalDelegate | ||
await payPalClient.start(request: request) | ||
XCTAssertNil(mockNativeCheckoutProvider.userAuthenticationEmail) | ||
} | ||
|
||
func testStart_whenNativeSDKOnApproveCalled_returnsPayPalResult() async { | ||
|