2015-10-03 15:48:42 +00:00
|
|
|
import {
|
2015-10-03 16:11:16 +00:00
|
|
|
expectValidTranslationString,
|
|
|
|
|
describeEachItem
|
2015-10-03 15:48:42 +00:00
|
|
|
} from '../helpers/content.helper';
|
2015-10-03 16:11:16 +00:00
|
|
|
import {each} from 'lodash';
|
2015-10-03 15:48:42 +00:00
|
|
|
|
2015-09-29 13:12:10 +00:00
|
|
|
import allFood from '../../common/script/src/content/food';
|
|
|
|
|
|
2015-10-03 16:11:16 +00:00
|
|
|
describeEachItem('Food', allFood, (food, key) => {
|
|
|
|
|
it('has a valid key', () => {
|
|
|
|
|
expect(food.key).to.eql(key);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('has a valid value attribute', () => {
|
|
|
|
|
expect(food.value).to.be.greaterThan(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('has a canBuy function', () => {
|
|
|
|
|
expect(food.canBuy).to.be.a('function');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('has a valid text attribute', () => {
|
|
|
|
|
expectValidTranslationString(food.text);
|
|
|
|
|
});
|
2015-09-29 13:12:10 +00:00
|
|
|
|
2015-10-03 16:11:16 +00:00
|
|
|
it('has a valid notes attribute', () => {
|
|
|
|
|
expectValidTranslationString(food.notes);
|
2015-09-29 13:12:10 +00:00
|
|
|
});
|
|
|
|
|
});
|