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

[chore] Update create_verify unit test with better invalid address #540

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

nwithan8
Copy link
Member

@nwithan8 nwithan8 commented Jan 5, 2024

Description

The unit test for testing the "verify" parameter on address creation was broken due to recent updates to downstream shipper systems that no longer considered the "incorrect" address we were sending to be incorrect.

To avoid having to find another "incorrect" address combination to trigger the original assertions, the unit test has been rewritten to send a guaranteed-incorrect address to the API, showcasing the difference in responses (the presence of delivery and/or zip4 verifications) based on whether the "verify" parameter was included.

This shifts the unit test away from having to account for server-side or downstream errors, and instead more closely tests what we're actually trying to test, that the "verify" parameter is being sent or not sent to the API, and that "verifications" are being deserialized properly from the response.

Testing

  • Unit tests updated
  • Cassettes re-recorded as needed

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

- Remove unused "incorrect address" fixture
- Re-record cassettes as needed
@nwithan8 nwithan8 requested a review from a team as a code owner January 5, 2024 19:34
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.

2 participants