diff --git a/src/__tests__/issued-orders.test.ts b/src/__tests__/issued-orders.test.ts index becab93..2034973 100644 --- a/src/__tests__/issued-orders.test.ts +++ b/src/__tests__/issued-orders.test.ts @@ -276,6 +276,8 @@ describe("renderIssuedOrderHtml", () => { }, ]; + const issuer = { name: "Jan Novák", email: "jan.novak@firma.cz" }; + it("renders the PO number, items, and both party names (PO direction)", () => { const html = renderIssuedOrderHtml( order, @@ -283,6 +285,7 @@ describe("renderIssuedOrderHtml", () => { { name: "Dodavatel s.r.o." }, { company_name: "Naše firma" }, "cs", + issuer, ); expect(html).toContain("26720001"); expect(html).toContain("Materiál"); @@ -297,8 +300,28 @@ describe("renderIssuedOrderHtml", () => { }); it("strips script tags from notes", () => { - const html = renderIssuedOrderHtml(order, items, null, null, "cs"); + const html = renderIssuedOrderHtml(order, items, null, null, "cs", issuer); expect(html).not.toContain("