Skip to content

Commit d63bb9c

Browse files
committed
test fix
1 parent 29a6a88 commit d63bb9c

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/e2e/tests/backend/endpoints/api/v1/ai-query.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ describe("AI Query Endpoint - Validation", () => {
244244
});
245245

246246
expect(response.status).toBe(400);
247-
expect(response.body).toEqual(expect.stringContaining(`Maximum ${MAX_IMAGES_PER_MESSAGE} images per message.`));
247+
expect(response.body).toMatchObject({
248+
code: "TOO_MANY_IMAGE_ATTACHMENTS",
249+
error: expect.stringContaining(`Maximum ${MAX_IMAGES_PER_MESSAGE} images per message.`),
250+
});
248251
});
249252

250253
it("rejects user messages with oversized image attachments", async ({ expect }) => {
@@ -272,7 +275,10 @@ describe("AI Query Endpoint - Validation", () => {
272275
});
273276

274277
expect(response.status).toBe(400);
275-
expect(response.body).toEqual(expect.stringContaining("Image exceeds"));
278+
expect(response.body).toMatchObject({
279+
code: "IMAGE_ATTACHMENT_TOO_LARGE",
280+
error: expect.stringContaining("Image exceeds"),
281+
});
276282
});
277283

278284
});

0 commit comments

Comments
 (0)