masterplan-lock / check (pull_request) Successful in 4s
CI (SIAX Cloud) / security (push) Successful in 14s
CI (SIAX Cloud) / security (pull_request) Successful in 15s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 16s
CI (SIAX Cloud) / integration (pull_request) Successful in 26s
masterplan-lock / check (push) Successful in 35s
CI (SIAX Cloud) / quality (pull_request) Successful in 37s
Security Scan (SIAX Cloud) / security (push) Successful in 1m4s
CI (SIAX Cloud) / integration (push) Successful in 1m14s
CI (SIAX Cloud) / quality (push) Successful in 2m12s
10 lines
530 B
TypeScript
10 lines
530 B
TypeScript
import { expect, it } from "vitest";
|
|
import { createOrder, getOrder, setStatusIfCurrent } from "@/lib/orders-store";
|
|
|
|
it("rejects a stale status writer in the in-memory fallback", async () => {
|
|
const { order } = await createOrder("custom", { markets: ["SE"], type: "Bolag" });
|
|
expect((await setStatusIfCurrent(order.order_id, "draft", "quoted"))?.status).toBe("quoted");
|
|
expect(await setStatusIfCurrent(order.order_id, "draft", "accepted")).toBeNull();
|
|
expect((await getOrder(order.order_id))?.status).toBe("quoted");
|
|
});
|