fix(api): Correct identifier for magic hatching potions

This commit is contained in:
Blade Barringer 2016-08-09 22:21:54 -05:00
parent 4df2b723fa
commit 2d553417b4
2 changed files with 25 additions and 1 deletions

View file

@ -59,7 +59,7 @@ shops.getMarketCategories = function getMarket (user, language) {
categories.push(hatchingPotionsCategory);
let premiumHatchingPotionsCategory = {
identifier: 'hatchingPotions',
identifier: 'magicHatchingPotions',
text: i18n.t('magicHatchingPotions', language),
notes: i18n.t('premiumPotionNoDropExplanation', language),
};

View file

@ -13,6 +13,12 @@ describe('shops', () => {
expect(shopCategories.length).to.be.greaterThan(2);
});
it('does not duplicate identifiers', () => {
let identifiers = Array.from(new Set(shopCategories.map(cat => cat.identifier)))
expect(identifiers.length).to.eql(shopCategories.length);
});
it('does not contain an empty category', () => {
_.each(shopCategories, (category) => {
expect(category.items.length).to.be.greaterThan(0);
@ -37,6 +43,12 @@ describe('shops', () => {
});
});
it('does not duplicate identifiers', () => {
let identifiers = Array.from(new Set(shopCategories.map(cat => cat.identifier)))
expect(identifiers.length).to.eql(shopCategories.length);
});
it('items contain required fields', () => {
_.each(shopCategories, (category) => {
_.each(category.items, (item) => {
@ -55,6 +67,12 @@ describe('shops', () => {
});
});
it('does not duplicate identifiers', () => {
let identifiers = Array.from(new Set(shopCategories.map(cat => cat.identifier)))
expect(identifiers.length).to.eql(shopCategories.length);
});
it('items contain required fields', () => {
_.each(shopCategories, (category) => {
_.each(category.items, (item) => {
@ -73,6 +91,12 @@ describe('shops', () => {
});
});
it('does not duplicate identifiers', () => {
let identifiers = Array.from(new Set(shopCategories.map(cat => cat.identifier)))
expect(identifiers.length).to.eql(shopCategories.length);
});
it('items contain required fields', () => {
_.each(shopCategories, (category) => {
_.each(category.items, (item) => {