[Import] Add tests for contact type & contact subtype handling #23475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
[Import] Add tests for contact type & contact subtype handling
Before
No tests to cover what happens when you update a contact with an external identifier match and
a) a different contact type or
b) a different contact subtype
After
Tests lock in what happens which turns out to be
a) no update if the contact type doesn't match
b) subtype is replaced on update
Technical Details
There is no real change to the non-test code. I had to add an early return due to an enotice but the code would otherwise return the same value here
Comments