feat(medusa): Add has_account to list-customers query params (#2811)

This commit is contained in:
Philip Korsholm
2022-12-16 12:16:34 +01:00
committed by GitHub
parent 6283010fd6
commit c16522d6ce
6 changed files with 42 additions and 6 deletions
@@ -70,6 +70,27 @@ describe("/admin/customers", () => {
)
})
it("lists only registered customers", async () => {
const api = useApi()
const response = await api
.get("/admin/customers?has_account=true", {
headers: {
Authorization: "Bearer test_token",
},
})
.catch((err) => {
console.log(err)
})
expect(response.status).toEqual(200)
expect(response.data.customers).toEqual(
expect.not.arrayContaining([
expect.objectContaining({ has_account: false }),
])
)
})
it("lists customers in group and count", async () => {
const api = useApi()