mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Create method to calculate whether or not user has attained all mystery equipment
This commit is contained in:
@@ -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);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user