fix: 完善动态错误指引与发票日期校验(09-05-error-explainability-payment-readiness)
这个提交包含在:
@@ -188,4 +188,17 @@ describe('me routes', () => {
|
||||
|
||||
await app.close();
|
||||
});
|
||||
|
||||
it('explains invalid notification settings without changing preferences', async () => {
|
||||
const { prisma, auditEntries } = createPrismaState();
|
||||
const app = await buildApp(prisma);
|
||||
try {
|
||||
const response = await app.inject({ method: 'PATCH', url: '/api/me/notification-preferences',
|
||||
headers: { authorization: 'Bearer test-token' }, payload: { notificationPushEnabled: 'false' } });
|
||||
expect(response.statusCode).toBe(400);
|
||||
expect(response.json().error.details.reasonCode).toBe('profile.notification_preferences_invalid');
|
||||
expect(prisma.employee.update).not.toHaveBeenCalled();
|
||||
expect(auditEntries).toHaveLength(0);
|
||||
} finally { await app.close(); }
|
||||
});
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户