feat(orders): migrate orders to backend API
This commit is contained in:
@@ -3,14 +3,16 @@ import { useAuthStore } from "@/store/auth"
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
describe("lib/api/orders", () => {
|
||||
it("returns { decision: { ok:false, error:{code,msg} } } when unauthenticated", () => {
|
||||
it("returns { decision: { ok:false, error:{code,msg} } } when unauthenticated", async () => {
|
||||
useAuthStore.getState().logout()
|
||||
|
||||
const res = createPaidOrder({
|
||||
playerId: "1005",
|
||||
serviceId: "5001",
|
||||
quantity: 1,
|
||||
})
|
||||
const res = await Promise.resolve(
|
||||
createPaidOrder({
|
||||
playerId: "1005",
|
||||
serviceId: "5001",
|
||||
quantity: 1,
|
||||
}),
|
||||
)
|
||||
|
||||
expect(res).toEqual({
|
||||
decision: {
|
||||
|
||||
Reference in New Issue
Block a user