From 6e8ff36a793554768f9743100fadc77f363ea0f3 Mon Sep 17 00:00:00 2001 From: kirsty-tortoise Date: Tue, 25 Sep 2018 09:42:02 +0100 Subject: [PATCH] add test for not adding mana points when flag is set --- test/common/ops/stats/allocate.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/common/ops/stats/allocate.js b/test/common/ops/stats/allocate.js index 62e162f55a..8d5c2471d1 100644 --- a/test/common/ops/stats/allocate.js +++ b/test/common/ops/stats/allocate.js @@ -98,4 +98,13 @@ describe('shared.ops.allocate', () => { expect(user.stats.int).to.equal(1); expect(user.stats.mp).to.equal(11); }); + + it('does not increase mana when allocating to "int" if flag is set', () => { + expect(user.stats.int).to.equal(0); + expect(user.stats.mp).to.equal(10); + user.stats.points = 1; + allocate(user, {query: {stat: 'int', ignoreManaPoints: true}}); + expect(user.stats.int).to.equal(1); + expect(user.stats.mp).to.equal(10); + }); });