feat(medusa): Add has_account to list-customers query params (#2811)
This commit is contained in:
1 parent
6283010fd6
commit
c16522d6ce
6 files changed
+42
-6
No files matched your search
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user