test(backend): add integration tests for access group promote/demote (ref #1142)#2292
Conversation
…ote user endpoint (ref #1142)
Greptile SummaryThis PR adds integration tests for the
Confidence Score: 5/5Test-only change; no production code is modified and the new tests exercise the correct API surface with proper assertions. All changes are confined to the integration test file. The pollForAuditEvent helper correctly resolves the async audit-log timing issue from earlier reviews, the details.userUuid key matches what the service actually stores, and the non-editor tests now cover both the promote and demote paths for both member and unrelated-user roles. No files require special attention.
|
| Filename | Overview |
|---|---|
| backend/tests/auth/access-groups/access-groups.test.ts | Adds four integration tests for promote/demote user permissions, pollForAuditEvent helper, and a demote-last-editor conflict guard test; assertions cover HTTP status, response body, DB state, and audit log events. |
Reviews (2): Last reviewed commit: "test(backend): fix flaky audit log asser..." | Re-trigger Greptile
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
This PR adds integration and functional tests for the access group promote and demote user endpoint, ensuring database updates, validation constraints, and audit log events are properly asserted. See #1142