refactor(achievements): crush down to much fewer notification types

most work by @CuriousMagpie
This commit is contained in:
SabreCat
2022-05-12 15:25:40 -05:00
parent d132b057eb
commit 1a74d2b3b0
21 changed files with 434 additions and 839 deletions

View File

@@ -634,7 +634,7 @@ describe('User Model', () => {
user = await user.save();
// verify that it's been awarded
expect(user.achievements.beastMaster).to.equal(true);
expect(user.notifications.find(notification => notification.type === 'ACHIEVEMENT_BEAST_MASTER')).to.exist;
expect(user.notifications.find(notification => notification.type === 'ACHIEVEMENT_STABLE')).to.exist;
// reset the user
user.achievements.beastMasterCount = 0;
@@ -683,9 +683,9 @@ describe('User Model', () => {
user = await user.save();
// verify that it's been awarded
expect(user.notifications.find(notification => notification.type === 'ACHIEVEMENT_BEAST_MASTER')).to.exist;
expect(user.notifications.find(notification => notification.type === 'ACHIEVEMENT_MOUNT_MASTER')).to.exist;
expect(user.notifications.find(notification => notification.type === 'ACHIEVEMENT_TRIAD_BINGO')).to.exist;
expect(user.notifications.find(
notification => notification.type === 'ACHIEVEMENT_STABLE',
)).to.exist;
});
context('manage unallocated stats points notifications', () => {