chore(): create default refund reasons (#13591)

* chore(): create default refund reasons

* Create great-donuts-swim.md

* woops

* woopsie

* woopsie

* tests

* tests

* woopsie

* fml

* fix: comment
This commit is contained in:
William Bouchard
2025-09-28 04:07:48 -04:00
committed by GitHub
parent 9d8ed70130
commit 5346079d47
30 changed files with 190 additions and 119 deletions

View File

@@ -1,8 +1,5 @@
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
import {
adminHeaders,
createAdminUser,
} from "../../../helpers/create-admin-user"
import { adminHeaders, createAdminUser, } from "../../../helpers/create-admin-user"
jest.setTimeout(30000)
@@ -41,15 +38,16 @@ medusaIntegrationTestRunner({
})
expect(response.status).toEqual(200)
expect(response.data.count).toEqual(2)
expect(response.data.refund_reasons).toEqual([
expect.objectContaining({
label: "reason 1 - too big",
}),
expect.objectContaining({
label: "reason 2 - too small",
}),
])
expect(response.data.count).toEqual(5) // There are 3 default ones
expect(response.data.refund_reasons).toEqual(
expect.arrayContaining([
expect.objectContaining({ label: "Customer Care Adjustment" }),
expect.objectContaining({ label: "Shipping Issue" }),
expect.objectContaining({ label: "Pricing Error" }),
expect.objectContaining({ label: "reason 1 - too big" }),
expect.objectContaining({ label: "reason 2 - too small" }),
])
)
})
it("should list refund-reasons with specific query", async () => {