Skip to content

Commit 2fe3d87

Browse files
committed
fix missing params
1 parent ed5aa8b commit 2fe3d87

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

tests/unit/SubscriptionUtilsTest.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ describe('SubscriptionUtils', () => {
267267
});
268268

269269
it("should return false if the user isn't a workspace's owner or isn't a member of any past due billing workspace", () => {
270-
expect(shouldRestrictUserBillableActions('1', undefined)).toBeFalsy();
270+
expect(shouldRestrictUserBillableActions('1', undefined, undefined)).toBeFalsy();
271271
});
272272

273273
it('should return false if the user is a non-owner of a workspace that is not in the shared NVP collection', async () => {
@@ -345,7 +345,7 @@ describe('SubscriptionUtils', () => {
345345
},
346346
});
347347

348-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(addDays(new Date(), 3)))).toBeFalsy();
348+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(addDays(new Date(), 3)), undefined)).toBeFalsy();
349349
});
350350

351351
it("should return false if the user is the workspace's owner that is past due billing but isn't owning any amount", async () => {
@@ -361,7 +361,7 @@ describe('SubscriptionUtils', () => {
361361
},
362362
});
363363

364-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeFalsy();
364+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeFalsy();
365365
});
366366

367367
it("should return true if the user is the workspace's owner that is past due billing and is owning some amount", async () => {
@@ -377,7 +377,7 @@ describe('SubscriptionUtils', () => {
377377
},
378378
});
379379

380-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeTruthy();
380+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeTruthy();
381381
});
382382

383383
it("should return false if the user is past due billing but is not the workspace's owner", async () => {
@@ -393,7 +393,7 @@ describe('SubscriptionUtils', () => {
393393
},
394394
});
395395

396-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeFalsy();
396+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeFalsy();
397397
});
398398

399399
it('should restrict when ownerBillingGraceEndPeriod is passed directly as 3rd param and is past due', async () => {
@@ -409,7 +409,7 @@ describe('SubscriptionUtils', () => {
409409
},
410410
});
411411

412-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeTruthy();
412+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeTruthy();
413413
});
414414

415415
it("should return false if the user is past due billing but is not the workspace's owner", async () => {
@@ -425,7 +425,7 @@ describe('SubscriptionUtils', () => {
425425
},
426426
});
427427

428-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeFalsy();
428+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeFalsy();
429429
});
430430

431431
it('should restrict when ownerBillingGraceEndPeriod is passed directly as 4th param and is past due', async () => {
@@ -441,7 +441,7 @@ describe('SubscriptionUtils', () => {
441441
},
442442
});
443443

444-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeTruthy();
444+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeTruthy();
445445
});
446446

447447
it('should not restrict when ownerBillingGraceEndPeriod is passed directly as 4th param but is not past due', async () => {
@@ -457,7 +457,7 @@ describe('SubscriptionUtils', () => {
457457
},
458458
});
459459

460-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(addDays(new Date(), 3)))).toBeFalsy();
460+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(addDays(new Date(), 3)), undefined)).toBeFalsy();
461461
});
462462

463463
it('should not restrict when ownerBillingGraceEndPeriod is passed directly as 4th param but amount owed is 0', async () => {
@@ -473,7 +473,7 @@ describe('SubscriptionUtils', () => {
473473
},
474474
});
475475

476-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeFalsy();
476+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeFalsy();
477477
});
478478

479479
it('should restrict when amountOwed is passed directly and is greater than 0', async () => {
@@ -518,7 +518,7 @@ describe('SubscriptionUtils', () => {
518518
},
519519
});
520520

521-
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)))).toBeFalsy();
521+
expect(shouldRestrictUserBillableActions(policyID, getUnixTime(subDays(new Date(), 3)), undefined)).toBeFalsy();
522522
});
523523
});
524524

0 commit comments

Comments
 (0)