Update user pinned items on purchases. (#10085)

fixes #10049
This commit is contained in:
Travis
2018-03-09 13:11:42 -08:00
committed by Sabe Jones
parent 07b3824c4c
commit f9a47b1420
3 changed files with 13 additions and 6 deletions
+11
View File
@@ -78,6 +78,17 @@ describe('shared.ops.buyGear', () => {
expect(user.items.gear.equipped).to.have.property('armor', 'armor_warrior_1');
});
it('updates the pinnedItems to the next item in the set if one exists', () => {
user.stats.gp = 31;
buyGear(user, {params: {key: 'armor_warrior_1'}});
expect(user.pinnedItems).to.deep.include({
type: 'marketGear',
path: 'gear.flat.armor_warrior_2',
});
});
it('buyGears equipment but does not auto-equip', () => {
user.stats.gp = 31;
user.preferences.autoEquip = false;