check every armoire gear 'canOwn' method (#10760)

This commit is contained in:
negue
2018-10-15 20:11:28 +02:00
committed by Matteo Pagliazzi
parent aa517e0ad6
commit 074837b274
2 changed files with 23 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
import armoireSet from '../../../website/common/script/content/gear/sets/armoire';
describe('armoireSet items', () => {
it('checks if canOwn has the same id', () => {
for (const type of Object.keys(armoireSet)) {
for (const itemKey of Object.keys(armoireSet[type])) {
const ownedKey = `${type}_armoire_${itemKey}`;
expect(armoireSet[type][itemKey].canOwn({
items: {
gear: {
owned: {
[ownedKey]: true,
},
},
},
}), `${ownedKey} canOwn is broken`).to.eq(true);
}
}
});
});
@@ -381,7 +381,7 @@ let armor = {
value: 100,
con: 15,
set: 'jeweledArcher',
canOwn: ownsItem('armor_armoire_JeweledArcherArmor'),
canOwn: ownsItem('armor_armoire_jeweledArcherArmor'),
},
coverallsOfBookbinding: {
text: t('armorArmoireCoverallsOfBookbindingText'),
@@ -842,7 +842,7 @@ let head = {
value: 100,
int: 15,
set: 'jeweledArcher',
canOwn: ownsItem('head_armoire_JeweledArcherHelm'),
canOwn: ownsItem('head_armoire_jeweledArcherHelm'),
},
veilOfSpades: {
text: t('headArmoireVeilOfSpadesText'),