-
Notifications
You must be signed in to change notification settings - Fork 429
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
feat: Create staff fixture #2928
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2928 +/- ##
==========================================
- Coverage 95.63% 95.62% -0.01%
==========================================
Files 1011 1011
Lines 29006 29015 +9
==========================================
+ Hits 27741 27747 +6
- Misses 1265 1268 +3
☔ View full report in Codecov by Sentry. |
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, two concerns though:
- I'd think on the naming some more since, AFAIK, we don't use the word "staff" anywhere.
user_user
is awkward of course, maybeuser_role_user
is better. - I'm reluctant to merge this without any tests actually using the fixture to avoid adding dead code.
I bounced it off Matt and he's with me on
I already have some tests that use this fixture. They're just in PRs that may be around for a while and I want this new fixture to use now. Plus we should all be defaulting to using this fixture anyway, since the admin client side steps many of the permissions checks. |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingChanges
Add a new fixture to transition to testing more routes by default at a lower level of access to ensure staff members are:
Essentially, start by default by using the staff fixture since the resulting tests are more robust since admin users are automatically able to sail through most permissions classes.
How did you test this code?
By using the same code in this PR