Fix content name error (#7995)

* fix: correct translation strings for pet/mount names

* chore: expose potion and egg key, not object in pet content api

* fix: Update feed route to use potion and egg objects

* refactor: Update feed route to use petInfo

* Use pet/mount text method for name

* correct feed route
This commit is contained in:
Blade Barringer
2016-09-10 22:05:25 -05:00
committed by GitHub
parent 295463b210
commit 3d53781bd3
9 changed files with 82 additions and 120 deletions
@@ -22,19 +22,14 @@ describe('POST /user/feed/:pet/:food', () => {
});
let food = content.food.Milk;
let [egg, potion] = 'Wolf-Base'.split('-');
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
let pet = content.petInfo['Wolf-Base'];
let res = await user.post('/user/feed/Wolf-Base/Milk');
await user.sync();
expect(res).to.eql({
data: user.items.pets['Wolf-Base'],
message: t('messageDontEnjoyFood', {
egg: t('petName', {
potion: potionText,
egg: eggText,
}),
egg: pet.text(),
foodText: food.text(),
}),
});