Fixes #11119: Added check for wacky pet before feeding (#12106)

* Added check for wacky pet before feeding

* added test for feeding wacky pets

* Fixed typo in test for feeding wacky pets

Co-authored-by: Jack Somers <somersjw9@gmail.com>
This commit is contained in:
Jack Somers
2020-04-20 16:17:42 -04:00
committed by GitHub
parent 13123c0bae
commit 6d6adfd919
2 changed files with 13 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ export default function feed (user, req = {}, analytics) {
throw new NotFound(i18n.t('messageFoodNotFound', req.language));
}
if (pet.type === 'special') {
if (pet.type === 'special' || pet.type === 'wacky') {
throw new NotAuthorized(i18n.t('messageCannotFeedPet', req.language));
}