Implement registration invite code flow and admin invite codes
This commit is contained in:
@@ -219,15 +219,20 @@ describe('authService', () => {
|
||||
},
|
||||
});
|
||||
|
||||
const user = await loginWithPhoneCode('13800138000', '123456');
|
||||
const response = await loginWithPhoneCode(
|
||||
'13800138000',
|
||||
'123456',
|
||||
'spring-2026',
|
||||
);
|
||||
|
||||
expect(user.username).toBe('138****8000');
|
||||
expect(response.user.username).toBe('138****8000');
|
||||
expect(apiClientMocks.requestJson).toHaveBeenCalledWith(
|
||||
'/api/auth/phone/login',
|
||||
expect.objectContaining({
|
||||
body: JSON.stringify({
|
||||
phone: '13800138000',
|
||||
code: '123456',
|
||||
inviteCode: 'SPRING2026',
|
||||
}),
|
||||
}),
|
||||
'登录失败',
|
||||
|
||||
Reference in New Issue
Block a user