mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
refactor(achievements): crush down to much fewer notification types
most work by @CuriousMagpie
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user