mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add tests for site deletion
Summary: This tests site deletion with and without a plan. Test Plan: adding tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3017
This commit is contained in:
@@ -16,7 +16,7 @@ export class Doom {
|
||||
|
||||
/**
|
||||
* Deletes a team site.
|
||||
* - Remove billing (fails if no outstanding balance).
|
||||
* - Remove billing (fails if there is an outstanding balance).
|
||||
* - Delete workspaces.
|
||||
* - Delete org.
|
||||
*/
|
||||
|
||||
@@ -1331,7 +1331,7 @@ export class HomeDBManager extends EventEmitter {
|
||||
...wsAcls, ...wsGroups, ...docs, ...docAcls, ...docGroups]);
|
||||
|
||||
// Delete billing account if this was the last org using it.
|
||||
const billingAccount = await manager.findOne(BillingAccount, org.billingAccount,
|
||||
const billingAccount = await manager.findOne(BillingAccount, org.billingAccountId,
|
||||
{relations: ['orgs']});
|
||||
if (billingAccount && billingAccount.orgs.length === 0) {
|
||||
await manager.remove([billingAccount]);
|
||||
|
||||
Reference in New Issue
Block a user