mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 19:06:42 +02:00
✅ test(auth): update tests for minimal JWT claims architecture
- Update auth.controller.spec.ts to expect accessToken/refreshToken/expiresIn - Refactor jwt-validation.spec.ts to test minimal claims (sub, email, role, sid) - Remove B2B/B2C org and credit_balance claims from tests (fetched via API now) - Add Better Auth CLI config for schema generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bc274846f0
commit
746df03591
3 changed files with 277 additions and 709 deletions
|
|
@ -167,7 +167,9 @@ describe('AuthController', () => {
|
|||
name: 'Test User',
|
||||
role: 'user',
|
||||
},
|
||||
token: 'jwt-access-token',
|
||||
accessToken: 'jwt-access-token',
|
||||
refreshToken: 'session-refresh-token',
|
||||
expiresIn: 900,
|
||||
};
|
||||
|
||||
betterAuthService.signIn.mockResolvedValue(expectedResult);
|
||||
|
|
@ -193,7 +195,9 @@ describe('AuthController', () => {
|
|||
|
||||
betterAuthService.signIn.mockResolvedValue({
|
||||
user: { id: '123', email: 'user@example.com', name: 'Test', role: 'user' },
|
||||
token: 'token',
|
||||
accessToken: 'jwt-token',
|
||||
refreshToken: 'refresh-token',
|
||||
expiresIn: 900,
|
||||
});
|
||||
|
||||
await controller.login(loginDto);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue