feat(medusa): Allow all relations on /admin/* endpoints (#2763)
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user