diff --git a/test/spec/controllers/inventoryCtrlSpec.js b/test/spec/controllers/inventoryCtrlSpec.js index dd6b1dc794..556a182e16 100644 --- a/test/spec/controllers/inventoryCtrlSpec.js +++ b/test/spec/controllers/inventoryCtrlSpec.js @@ -223,13 +223,17 @@ describe('Inventory Controller', function() { }); }); - describe('#hasAllTimeTravelerItems', function() { + describe.only('#hasAllTimeTravelerItems', function() { it('returns false if items remain for purchase with Mystic Hourglasses', function() { expect(scope.hasAllTimeTravelerItems()).to.eql(false); }); it('returns true if there are no items left to purchase', inject(function(Content) { - sandbox.stub(Content, 'timeTravelerStore').returns({}); + for (var item in Content.gear.flat) { + if (item.indexOf('mystery') > -1) { + user.items.gear.owned[item] = true; + } + } for (var pet in Content.timeTravelStable.pets) { user.items.pets[pet] = 5; } @@ -247,7 +251,11 @@ describe('Inventory Controller', function() { }); it('returns true for Mystery Sets if there are no sets left to purchase', inject(function(Content) { - sandbox.stub(Content, 'timeTravelerStore').returns({}); + for (var item in Content.gear.flat) { + if (item.indexOf('mystery') > -1) { + user.items.gear.owned[item] = true; + } + } expect(scope.hasAllTimeTravelerItemsOfType('mystery')).to.eql(true); }));