Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb9f83d638 |
@@ -195,8 +195,8 @@ describe("POST /clients", () => {
|
|||||||
expect(insertedValues[0]!.name).toBe("Charlie");
|
expect(insertedValues[0]!.name).toBe("Charlie");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("creates a client with only required name field", async () => {
|
it("creates a client with required fields", async () => {
|
||||||
const res = await jsonRequest("POST", "/clients", { name: "Dana" });
|
const res = await jsonRequest("POST", "/clients", { name: "Dana", email: "dana@example.com" });
|
||||||
expect(res.status).toBe(201);
|
expect(res.status).toBe(201);
|
||||||
expect(insertedValues[0]!.name).toBe("Dana");
|
expect(insertedValues[0]!.name).toBe("Dana");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user