-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: send list of storage quota violators to [email protected], …
…not admin@ (#1369)
- Loading branch information
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ describe('cron - check user storage quotas', () => { | |
beforeEach(async () => { | ||
emailService = new EmailService({ db: dbClient, provider: EMAIL_PROVIDERS.dummy }) | ||
adminUser = await createUser(dbClient, { | ||
email: 'admin@web3.storage', | ||
email: 'support@web3.storage', | ||
name: 'Web3 Storage Admin' | ||
}) | ||
|
||
|
@@ -62,14 +62,14 @@ describe('cron - check user storage quotas', () => { | |
assert.equal(emailService.provider.sendEmail.callCount, 4) | ||
|
||
// Admin email | ||
emailService.provider.sendEmail.calledWith(EMAIL_TYPE.AdminStorageExceeded, 'admin@web3.storage') | ||
emailService.provider.sendEmail.calledWith(EMAIL_TYPE.AdminStorageExceeded, 'support@web3.storage') | ||
|
||
// Users email | ||
emailService.provider.sendEmail.calledWith(EMAIL_TYPE.User75PercentStorage, '[email protected]') | ||
emailService.provider.sendEmail.calledWith(EMAIL_TYPE.User85PercentStorage, '[email protected]') | ||
emailService.provider.sendEmail.calledWith(EMAIL_TYPE.User100PercentStorage, '[email protected]') | ||
|
||
const adminUser = await dbClient.getUserByEmail('admin@web3.storage') | ||
const adminUser = await dbClient.getUserByEmail('support@web3.storage') | ||
assert.ok(adminUser, 'admin user found') | ||
const adminStorageExceeded = await dbClient.emailHasBeenSent({ | ||
userId: Number(adminUser._id), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters