mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 15:09:32 +00:00
fix(test): account for cumulative balance
This commit is contained in:
parent
b5c1b78789
commit
4f5f15d162
1 changed files with 2 additions and 1 deletions
|
|
@ -204,6 +204,7 @@ describe('shared.ops.purchase', () => {
|
|||
});
|
||||
|
||||
it('purchases quest bundles', () => {
|
||||
let startingBalance = user.balance;
|
||||
let clock = sandbox.useFakeTimers(moment('2017-05-20').valueOf());
|
||||
let type = 'bundles';
|
||||
let key = 'featheredFriends';
|
||||
|
|
@ -220,7 +221,7 @@ describe('shared.ops.purchase', () => {
|
|||
expect(user.items.quests[bundledKey]).to.equal(1);
|
||||
});
|
||||
|
||||
expect(user.balance).to.equal(userGemAmount - price);
|
||||
expect(user.balance).to.equal(startingBalance - price);
|
||||
|
||||
clock.restore();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue