-
Notifications
You must be signed in to change notification settings - Fork 60
Add tests for every scenario of the relationship operations #47
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
Conversation
Without this, new allow_action/disallow_action calls for the same record would accidentally override and disable the previous stubs
This allows us to see that there might be some cases untested. Now the test names show that there might be a matrix of different cases that should be tested
These tests seemed to be missing in the original pull request. This commit is what all the other previous commits for spec changes and stubbing changes were leading up to
When both methods aren't stubbed, the mocking is unhelpfully bypassed and the policy acts like the other method wouldn't be present at all.
fc64038 to
5e51e82
Compare
|
Review from @lime or @matthias-g would be appreciated I added you as a collaborator now, @matthias-g 🎉. All pull requests will need a review before merging, so if you want to help you can review open pull requests, too, and give comments to help the PRs advance. You'll notice that we now also have a few labels — these are similar to what we use internally at Venuu, so let me walk through them quickly: Type labelsThese labels allow us to distinguish issues and PRs from each other. It's OK if a PR or an issue doesn't have any type label set.
Status labelsThese are labels that would be set by the PR author, if it would be possible. They allow us to see when the PR is in need of a review or other help.
Review labelsThese labels allow us to quickly see what the review status of a PR is. These are set by the reviewer to show the review status.
|
matthias-g
left a comment
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.
Looks good to me. Thanks for checking for and adding the missing cases!
|
Thanks for the review :) |








We want to make sure the tests for the new cases match all the possible cases:
update?update?update?I needed to do some refactoring with the stubbing logic to make it work correctly for all these cases.