mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-04 23:24:49 -04:00
This commit introduces a new shared context, `with authenticated member`, to standardize authentication in the API request specs. The shared context creates a member, generates an API token using the `Token token=` scheme, and provides authenticated and unauthenticated headers for use in the tests. All API request specs in `spec/requests/api/v1/` have been updated to use this shared context. This includes: * Associating test data with the authenticated member to correctly test authorization scopes. * Updating test expectations to reflect the new scoped behavior of the API endpoints. * Refactoring `create`, `update`, and `delete` tests to use the shared headers for checking authorization rules, making the tests cleaner and more robust.