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

Regional partner contact logic #20884

Merged
merged 3 commits into from Mar 1, 2018
Merged

Conversation

tessawiedmann
Copy link
Contributor

Updated logic for matching regional partners to use find_by_region which uses state and zip codes. Also updated tests for that logic

@sureshc
Copy link
Contributor

sureshc commented Feb 26, 2018

I'm not familiar with the regionalPartnerContact feature, but I'm wondering if there should be new tests in regional_partner_contact_test.rb to verify that the new matching logic is working?

Copy link
Contributor

@tanyaparker tanyaparker left a 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

  1. in a state with no regional partners (so it remains unmatched)
  2. in a state w/ only 1 Regional Partner like Nebraska (so it matches using state)
  3. in a state w/ several partners like Texas (so it matches uses zip)

@clareconstantine
Copy link

@sureshc @tanyaparker since the actual matching logic hasn't changed - we are just calling the existing method on RegionalPartner which is tested here, it felt a little redundant. But we can definitely add them for extra peace of mind!

@sureshc
Copy link
Contributor

sureshc commented Feb 27, 2018

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

@tanyaparker
Copy link
Contributor

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

@sureshc
Copy link
Contributor

sureshc commented Mar 1, 2018

@tessawiedmann The new test looks good!

@tessawiedmann tessawiedmann merged commit ac37cd4 into staging Mar 1, 2018
@tessawiedmann tessawiedmann deleted the regionalPartnerContact branch March 1, 2018 22:03
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.

None yet

4 participants