mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 15:09:32 +00:00
test(bundles): check balance deduction
This commit is contained in:
parent
72b8ba2d5c
commit
f2ace5bb63
1 changed files with 4 additions and 1 deletions
|
|
@ -204,9 +204,10 @@ describe('shared.ops.purchase', () => {
|
|||
});
|
||||
|
||||
it('purchases quest bundles', () => {
|
||||
let clock = sandbox.useFakeTimers(+moment('2017-05-20'));
|
||||
let clock = sandbox.useFakeTimers(moment('2017-05-20').valueOf());
|
||||
let type = 'bundles';
|
||||
let key = 'featheredFriends';
|
||||
let price = 1.75;
|
||||
let questList = [
|
||||
'falcon',
|
||||
'harpy',
|
||||
|
|
@ -219,6 +220,8 @@ describe('shared.ops.purchase', () => {
|
|||
expect(user.items.quests[bundledKey]).to.equal(1);
|
||||
});
|
||||
|
||||
expect(user.balance).to.equal(userGemAmount - price);
|
||||
|
||||
clock.restore();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue