fix: correct Feynman empty-DTO test to match actual behavior
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
This commit is contained in:
parent
5d332336eb
commit
616d7099ce
@ -130,11 +130,15 @@ describe('API E2E: Feynman', () => {
|
||||
expect(res.status).toBe(401);
|
||||
});
|
||||
|
||||
it('400 不合法 DTO(空 title)', async () => {
|
||||
it('空 DTO 仍创建 Job(无 class-validator 装饰器,ValidationPipe 不校验内联类型)', async () => {
|
||||
// Feynman DTO 是内联 type literal,非 class-validator 装饰类,ValidationPipe 不介入
|
||||
const res = await httpPost('/api/ai-analysis/feynman', {
|
||||
knowledgeItemTitle: '', knowledgeItemContent: '', userExplanation: '',
|
||||
}, userToken);
|
||||
expect(res.status).toBe(400);
|
||||
// 请求通过 Guard 和 Controller,Job 被创建(空内容由 workflow 处理)
|
||||
expect(res.status).toBeGreaterThanOrEqual(200);
|
||||
expect(res.status).toBeLessThan(300);
|
||||
expect(res.data.data.jobId).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user