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
Regional partner contact logic #20884
Conversation
I'm not familiar with the regionalPartnerContact feature, but I'm wondering if there should be new tests in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let Clare review the code, but the principle looks good to me.
Can we add a test for each scenario of matching? Say someone is from a school
- in a state with no regional partners (so it remains unmatched)
- in a state w/ only 1 Regional Partner like Nebraska (so it matches using state)
- in a state w/ several partners like Texas (so it matches uses zip)
@sureshc @tanyaparker since the actual matching logic hasn't changed - we are just calling the existing method on |
Oops, yes. There are plenty of test on the RegionalPartner model itself. I don't think any redundant tests are needed here except to ensure that RegionalPartnerContact works as expected now that it's using the matching method provided by RegionalPartner |
Oh! Didn't notice I was redundant with Suresh's feedback. And agree, we don't need additional tests if it's already tested. :D |
9d5eaa3
to
86c15c3
Compare
@tessawiedmann The new test looks good! |
Updated logic for matching regional partners to use find_by_region which uses state and zip codes. Also updated tests for that logic