-
Notifications
You must be signed in to change notification settings - Fork 112
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
LG-13120 | Moves ssn_is_unique logic into ResolutionProofingJob #10801
Conversation
I wanted to add a test to VerifyInfoControllerSpec, but it turned into a downwards spiral. Where that spiral ended--or at least, where I decided to put this up as WIP PR rather than continuing to dig--is a belief that VerifyInfoController is doing way too much, and that adding to its spec is making it worse. I guess this is not shocking, given that this story stems from removing stuff that's kind of inappropriately in the VerifyInfoConcern which supports that class. I also realized with some concern that I'm still not completely sure whether this is all getting called in the Also, the show method is 10 lines, including newlines and simple assignments. Its test is 299 lines. |
This adds ssn_is_unique, but more significantly pulls a ludicrously long pattern of lines of nested hashes out because what was there previously broke my brain trying to change this.
Now that it's not all mashed together, it's easy to realize what parts are duplicated and clean them up!
attributes_requiring_additional_verification: [], | ||
vendor_name: 'ResolutionMock', | ||
vendor_workflow: nil } | ||
end |
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.
These two blocks are used in both of the blocks below.
}, | ||
}, | ||
} | ||
end |
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.
base_proofing_results
and in_person_path_proofing_results
were used below, all mashed together incomprehensibly.
I added ssn_is_unique
, but this is otherwise the same content, just made more readable.
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.
Cool, I am 👍 on this change
changelog: Internal, ResolutionProofingJob, Populate ssn_is_unique
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.
LGTM! Thank you for the analytics spec cleanup
}, | ||
}, | ||
} | ||
end |
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.
Cool, I am 👍 on this change
before do | ||
create(:profile, pii: Idp::Constants::MOCK_IDV_APPLICANT_WITH_SSN) | ||
end |
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.
❤️ thanks for keeping it simple!
🎫 Ticket
Link to the relevant ticket:
LG-13120
🛠 Summary of changes
We want to move the
ssn_is_unique
check out of VerifyInfoConcern entirely, and start doing it in ResolutionProofingJob instead.Part 1 of this process is adding it in the ResolutionProofingJob. Since it's stored in the results, it'll come back to VerifyInfoConcern "for free."
After this is released, a separate PR will rip the existing code out of VerifyInfoConcern.