-
-
Notifications
You must be signed in to change notification settings - Fork 910
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
Account for composite primary key in foreign key #1396
Conversation
@vsppedro what do you think of this? Things get a little weird in symbols vs strings. When I think it solves the problem, though it looks like primary key has the same original issue (no error message in the I'm also not really sure what level of support is expected for Composite Primary Keys. shoulda-matchers doesn't mention that it supports CPK, but it also did work until the most recent version. I'm open to any and all feedback. One thing that's nice here is that it actually asserts that the configured foreign key's corresponding column(s) exist when passing in an |
I should have asked if you would like to make the contribution. I'm sorry. Thank you very much! LGTM! |
You're totally fine! |
I agree with you, but I think we can do that on another PR later. Let's fix this first. 👍 |
@mcmire, what do you think of this? I'm thinking of releasing a fix for this - v4.5.1. |
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.
Makes sense to me!
Thanks! Merging! |
Hi @natematykiewicz, I'm sending this message just to let you know that we now have a new version of SholdaMatchers with your contribution! Thank you again! |
I just upgraded. Everything works and the additional testing showed me that I had an incorrect |
Just FTR, I think there is something about the symbol vs strings, because testing against Rails 6.1, there are two test failures:
|
Fixes [#1392]