Create method to calculate whether or not user has attained all mystery equipment

This commit is contained in:
Blade Barringer
2015-09-13 16:26:29 -05:00
parent b6f02d388f
commit 5553d74334
3 changed files with 21 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ describe('Inventory Controller', function() {
user = specHelper.newUser({
balance: 4,
items: {
gear: { owned: {} },
eggs: { Cactus: 1 },
hatchingPotions: { Base: 1 },
food: { Meat: 1 },
@@ -155,4 +156,16 @@ describe('Inventory Controller', function() {
expect(possibleValues).to.contain(cardsModalScope.cardMessage);
});
});
describe('#hasAllTimeTravelerItems', function() {
it('returns false if there are items left in the time traveler store', 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({});
expect(scope.hasAllTimeTravelerItems()).to.eql(true);
}));
});
});