Ensure the in-person verifcation profile has an enrollment record #11315
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.
🛠 Summary of changes
In theory, it should never happen that the profile is pending verification and the enrollment record does not exist. A previous discussion in a meeting that I missed brought up the point that the factory does not address this properly.
This is essentially pulling @aduth's work out of #11129 , one of the smallest pieces of that PR that is still useful to the development team on its own. In fact, in pairing with @eileen-nava on this, I basically retraced much of what @aduth had done before @eileen-nava pointed out the repetition.
We looked at pulling in more from #11129 , and doing so looked like it might double the level of effort
📜 Testing Plan
At @eileen-nava's suggestion when we were working together, we walked through inserting a
binding.pry
in a test that uses this factory and made sure that we got appropriate results back. I'm greatful to Eileen for walking me through a complicated process that I didn't understand and pointing out which details should be checked. For example:as well as checking other relational data.
In addition, our test suite is thorough enough that I have high confidence if the full test suite passes with this change. While making only some of these changes, many tests failed loudly.