update tests for the attributes added to heroAdminFields

This commit is contained in:
Alys
2020-04-01 20:29:26 +10:00
parent fcc7b1cebb
commit caf59de676
2 changed files with 5 additions and 0 deletions
@@ -49,6 +49,7 @@ describe('GET /heroes/:heroId', () => {
expect(heroRes).to.have.all.keys([ // works as: object has all and only these keys
'_id', 'id', 'balance', 'profile', 'purchased',
'contributor', 'auth', 'items',
'preferences', 'lastCron', 'party',
]);
expect(heroRes.auth.local).not.to.have.keys(['salt', 'hashed_password']);
expect(heroRes.profile).to.have.all.keys(['name']);
@@ -63,6 +64,7 @@ describe('GET /heroes/:heroId', () => {
expect(heroRes).to.have.all.keys([ // works as: object has all and only these keys
'_id', 'id', 'balance', 'profile', 'purchased',
'contributor', 'auth', 'items',
'preferences', 'lastCron', 'party',
]);
expect(heroRes.auth.local).not.to.have.keys(['salt', 'hashed_password']);
expect(heroRes.profile).to.have.all.keys(['name']);
@@ -133,6 +133,7 @@ describe('PUT /heroes/:heroId', () => {
expect(heroRes).to.have.all.keys([ // works as: object has all and only these keys
'_id', 'balance', 'profile', 'purchased',
'contributor', 'auth', 'items', 'flags',
'preferences', 'lastCron', 'party',
]);
expect(heroRes.auth.local).not.to.have.keys(['salt', 'hashed_password']);
expect(heroRes.profile).to.have.all.keys(['name']);
@@ -160,6 +161,7 @@ describe('PUT /heroes/:heroId', () => {
expect(heroRes).to.have.all.keys([ // works as: object has all and only these keys
'_id', 'balance', 'profile', 'purchased',
'contributor', 'auth', 'items', 'flags',
'preferences', 'lastCron', 'party',
]);
expect(heroRes.auth.local).not.to.have.keys(['salt', 'hashed_password']);
expect(heroRes.profile).to.have.all.keys(['name']);
@@ -184,6 +186,7 @@ describe('PUT /heroes/:heroId', () => {
expect(heroRes).to.have.all.keys([ // works as: object has all and only these keys
'_id', 'balance', 'profile', 'purchased',
'contributor', 'auth', 'items', 'flags',
'preferences', 'lastCron', 'party',
]);
expect(heroRes.auth.local).not.to.have.keys(['salt', 'hashed_password']);
expect(heroRes.profile).to.have.all.keys(['name']);