Feat: Delete customer group (#1102)

This commit is contained in:
Philip Korsholm
2022-02-24 14:20:58 +01:00
committed by GitHub
parent 9ab0568b47
commit e35a4fb2ea
6 changed files with 191 additions and 1 deletions

View File

@@ -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)
}