From caf59de67697f6ca235b74e9cd1373cb783a48cf Mon Sep 17 00:00:00 2001 From: Alys Date: Wed, 1 Apr 2020 20:29:26 +1000 Subject: [PATCH] update tests for the attributes added to heroAdminFields --- test/api/v3/integration/hall/GET-hall_heroes_heroId.test.js | 2 ++ test/api/v3/integration/hall/PUT-hall_heores_heroId.test.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/test/api/v3/integration/hall/GET-hall_heroes_heroId.test.js b/test/api/v3/integration/hall/GET-hall_heroes_heroId.test.js index c3e78a8f79..f98400f977 100644 --- a/test/api/v3/integration/hall/GET-hall_heroes_heroId.test.js +++ b/test/api/v3/integration/hall/GET-hall_heroes_heroId.test.js @@ -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']); diff --git a/test/api/v3/integration/hall/PUT-hall_heores_heroId.test.js b/test/api/v3/integration/hall/PUT-hall_heores_heroId.test.js index db6eaf82ae..c009739a02 100644 --- a/test/api/v3/integration/hall/PUT-hall_heores_heroId.test.js +++ b/test/api/v3/integration/hall/PUT-hall_heores_heroId.test.js @@ -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']);