feat(medusa): Allow all relations on /admin/* endpoints (#2763)

This commit is contained in:
Frane Polić
2022-12-15 09:07:07 +01:00
committed by GitHub
parent 0a9c891853
commit 2d22b17b49
11 changed files with 0 additions and 257 deletions

View File

@@ -1444,22 +1444,6 @@ describe("/admin/orders", () => {
)
})
it("throws on invalid relation", async () => {
const api = useApi()
try {
await api.get("/admin/orders?fields=id&expand=variants", {
headers: {
authorization: "Bearer test_token",
},
})
} catch (error) {
expect(error.response.data.message).toBe(
"Relations [variants] are not valid"
)
}
})
it("lists all orders with a fulfillment status = fulfilled and payment status = captured", async () => {
const api = useApi()
@@ -2355,22 +2339,6 @@ describe("/admin/orders", () => {
})
)
})
it("throws on invalid relation", async () => {
const api = useApi()
try {
await api.get("/admin/orders/test-order?fields=id&expand=variants", {
headers: {
authorization: "Bearer test_token",
},
})
} catch (error) {
expect(error.response.data.message).toBe(
"Relations [variants] are not valid"
)
}
})
})
describe("POST /orders/:id/refund", () => {