Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve deviceData nil on BTDropInResult #378

Merged
merged 3 commits into from
Aug 10, 2022

Conversation

jaxdesmarais
Copy link
Contributor

Summary of changes

  • Resolve issue where deviceData was always nil on BTDropInResult - this was due to how we were mocking the data collector but previously never actually calling the data collector to get device data as expected

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

@jaxdesmarais jaxdesmarais requested a review from a team as a code owner August 9, 2022 19:40
Comment on lines +46 to +51
if (PayPalDataCollectorClass != NSClassFromString(PayPalDataCollectorClassString)) {
_deviceData = [PayPalDataCollectorClass collectPayPalDeviceData];
return self;
}
// Otherwise we should use `PPDataCollector` to collect device data
_deviceData = [PPDataCollector collectPayPalDeviceData];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wild. So the test was injecting a definition for PayPalDataCollectorClass? So glad we're moving to Swift lol.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the test was setting a class, but the actual implementation never was - so tests were passing with the mock class being injected and the live code was returning nil for the past year 😢 Swift will certainly help us catch these cases sooner!

@jaxdesmarais jaxdesmarais deleted the resolve-device-data-nil branch August 9, 2022 20:30
@jaxdesmarais jaxdesmarais restored the resolve-device-data-nil branch August 9, 2022 21:25
@jaxdesmarais jaxdesmarais deleted the resolve-device-data-nil branch August 9, 2022 21:27
@jaxdesmarais jaxdesmarais restored the resolve-device-data-nil branch August 9, 2022 21:27
@jaxdesmarais jaxdesmarais reopened this Aug 9, 2022
@jaxdesmarais
Copy link
Contributor Author

Tower was acting wild and closed/deleted this branch temporarily, so ignore that noise/chaos

Copy link
Contributor

@mattwylder mattwylder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@jaxdesmarais jaxdesmarais merged commit 55087f9 into master Aug 10, 2022
@jaxdesmarais jaxdesmarais deleted the resolve-device-data-nil branch August 10, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants