-
Notifications
You must be signed in to change notification settings - Fork 62
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
[95896] Fix AccreditedOrganization Model flaky spec #19086
Conversation
I just randomly saw this, but I've seen this fail before, one quick question. Is there a reason you're not updating the Factory itself in this case? The factory shouldn't be coming up with In fact, |
POA codes can be any mix of 3 alphanumeric characters ( We could change the uniqueness constraint to be case insensitive. |
Wouldn't that be the correct thing to do then? As you described it, right now certain valid POA codes will fail validation, which seems like you actually just described a bug that currently exists in the validation logic |
I started on this change right after I sent the message |
Maybe not. I found an old thread for |
Whoa, so they're saying that the validation works but the shoulda_matcher fails? That's so weird, haha |
I ran the spec and it actually seems to give what's probably the right answer, adding case_sensitive to the validation itself, right?
|
I'd say our situation falls under
Yeah it seems like a weird way to handle this edge case of |
Just to follow up, I think the change here makes sense then. My only other comment would be that it seems weird that the POA numbers are case sensitive (like if |
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 the review and the back-and-forth, yall!
Backend-review-group approval confirmed. |
Summary
poa_code
on model validation specs. The factory's random poa code can sometimes only contain numeric characters which breaks the case sensitivity check in the shoulda matcher uniqueness assertion.Related issue(s)
Testing done
Acceptance criteria
Requested Feedback
(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?