feat(F-154): completed feature
This commit is contained in:
@@ -159,7 +159,11 @@ describe.skipIf(!hasDb)('users + RBAC flows (real PostgreSQL)', () => {
|
||||
});
|
||||
expect(asAdmin.statusCode).toBe(200);
|
||||
const body = asAdmin.json() as { items: Array<{ id: string }> };
|
||||
expect(body.items.some((item) => item.id === anaId)).toBe(true);
|
||||
// F-154: /users now serves storefront customers only (role 'customer').
|
||||
// ana was promoted to 'admin' -> no longer a customer -> excluded from the list.
|
||||
// ben is a storefront customer -> included.
|
||||
expect(body.items.some((item) => item.id === benId)).toBe(true);
|
||||
expect(body.items.some((item) => item.id === anaId)).toBe(false);
|
||||
|
||||
// Admin can also read another user's profile (owner-or-admin).
|
||||
const adminReadsBen = await app.inject({
|
||||
|
||||
Reference in New Issue
Block a user