Compare commits

...

1 Commits

Author SHA1 Message Date
Flea Flicker fb9f83d638 fix(GRO-643): update test to include required email field
The test was sending only name without email, but since email became
required in createClientSchema, it now returns 400 instead of 201.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-17 00:44:41 +00:00
+2 -2
View File
@@ -195,8 +195,8 @@ describe("POST /clients", () => {
expect(insertedValues[0]!.name).toBe("Charlie");
});
it("creates a client with only required name field", async () => {
const res = await jsonRequest("POST", "/clients", { name: "Dana" });
it("creates a client with required fields", async () => {
const res = await jsonRequest("POST", "/clients", { name: "Dana", email: "dana@example.com" });
expect(res.status).toBe(201);
expect(insertedValues[0]!.name).toBe("Dana");
});