Fix auth test: correct expected error message for unauthenticated org access

The test was expecting 'Unauthorized: Invalid organization access' but the
authorizeAnalytics function first checks if userId is null and throws
'Unauthorized: User required' before reaching the organization validation.

This fixes the failing test in CI by aligning the test expectation with
the actual function behavior.
This commit is contained in:
Roo Code 2025-07-08 12:20:56 +00:00
parent 1051bb684f
commit 8826ed6829

View file

@ -191,7 +191,7 @@ describe('authorizeAnalytics', () => {
requestedOrgId: 'org-456',
requestedUserId: null,
}),
).rejects.toThrow('Unauthorized: Invalid organization access');
).rejects.toThrow('Unauthorized: User required');
});
});