Feat: Delete customer group (#1102)

This commit is contained in:
Philip Korsholm authored and olivermrbl committed 2022-02-25 18:53:49 +01:00
1 parent a9f516ead2
commit 44fb9531d2
6 files changed
+191 -1

No files matched your search

@@ -42,6 +42,11 @@ module.exports = async (connection, data = {}) => {
groups: [{ id: "test-group-5", name: "test-group-5" }],
})
const deletionCustomer = await manager.create(Customer, {
id: "test-customer-delete-cg",
email: "test-deletetion-cg@email.com",
})
await manager.insert(CustomerGroup, {
id: "customer-group-1",
name: "vip-customers",
@@ -56,4 +61,12 @@ module.exports = async (connection, data = {}) => {
id: "test-group-5",
name: "test-group-5",
})
const c_group_delete = manager.create(CustomerGroup, {
id: "test-group-delete",
name: "test-group-delete",
})
deletionCustomer.groups = [c_group_delete]
await manager.save(deletionCustomer)
}