test(bundles): shop and purchase tests

This commit is contained in:
SabreCat
2017-05-17 19:37:19 +00:00
parent 4de5b4253b
commit 8555e4bea8
3 changed files with 47 additions and 4 deletions
+21
View File
@@ -9,6 +9,8 @@ import i18n from '../../../website/common/script/i18n';
import {
generateUser,
} from '../../helpers/common.helper';
import forEach from 'lodash/forEach';
import moment from 'moment';
describe('shared.ops.purchase', () => {
const SEASONAL_FOOD = 'Meat';
@@ -200,5 +202,24 @@ describe('shared.ops.purchase', () => {
expect(user.items.gear.owned[key]).to.be.true;
});
it.only('purchases quest bundles', () => {
let clock = sandbox.useFakeTimers(+moment('2017-05-20'));
let type = 'bundles';
let key = 'featheredFriends';
let questList = [
'falcon',
'harpy',
'owl',
];
purchase(user, {params: {type, key}});
forEach(questList, (bundledKey) => {
expect(user.items.quests[bundledKey]).to.equal(1);
});
clock.restore();
});
});
});