Closed jaxdesmarais closed 4 months ago
Changes look good! But I think this needs 2 unit tests based on the bool
result of application.open(redirectURL, options: [:])
Changes look good! But I think this needs 2 unit tests based on the
bool
result ofapplication.open(redirectURL, options: [:])
It looks like there is a test testTokenizeVaultAccount_whenPayPalAppApprovalURLPresent_attemptsAppSwitchWithParameters
that is already asserting on this result. As far as testing the inverse, it looks like we always hardcode the result of application.open
to success
here so we don't actually have any tests around the failure case: https://github.com/braintree/braintree_ios/blob/4d4f107700b1483addeae0b3b7c741014f398a5d/UnitTests/BraintreeTestShared/FakeApplication.swift#L15
As far as testing the inverse, it looks like we always hardcode the result of application.open to success here so we don't actually have any tests around the failure case:
Added a test for the failure case + error in this commit 4123bcf33938ee48c99af2d4805648c4178ff441
Summary of changes
application.open
viainvokedOpenURLSuccessfully
BTPayPalError.appSwitchFailed
Checklist
Authors