From e0972d80fab18fb13eb3b5299720db84ebcee7f5 Mon Sep 17 00:00:00 2001 From: shawn Date: Fri, 11 Sep 2026 15:05:31 +1000 Subject: [PATCH] test: pin customer-name search to the name column Search "JOHN SMITH" instead of "JOHN" so the regression test only matches through the customer name column ("john" alone also matched the email), ensuring case-insensitive name matching is verified on its own. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01HUfxyr6EcRi4EYSX1wLoRh --- apps/api/src/orders/orders-routes.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/orders/orders-routes.test.ts b/apps/api/src/orders/orders-routes.test.ts index 8885282..edc44a1 100644 --- a/apps/api/src/orders/orders-routes.test.ts +++ b/apps/api/src/orders/orders-routes.test.ts @@ -45,7 +45,7 @@ describe("order routes", () => { }); test("finds orders by customer name regardless of letter case", async () => { - const response = await app.inject({ method: "GET", url: "/api/orders?query=JOHN", headers: { cookie: employeeCookie } }); + const response = await app.inject({ method: "GET", url: "/api/orders?query=JOHN%20SMITH", headers: { cookie: employeeCookie } }); expect(response.statusCode).toBe(200); expect(response.json().map((order: { orderNumber: string }) => order.orderNumber)).toEqual(["ORD-1001", "ORD-1003"]);