feat(pets): Peppermint Hatching Potions

Also fixes an issue where the pet hatching modal would appear when the user attempted to hatch a premium version of a quest pet.
This commit is contained in:
Sabe Jones
2015-12-04 17:20:33 -05:00
parent a3665e7095
commit 0f578b79ff
45 changed files with 3317 additions and 3108 deletions

View File

@@ -89,17 +89,18 @@ describe('Inventory Controller', function() {
});
it('does not show modal if user tries to hatch a pet they own', function(){
user.items.pets['Cactus-Base'] = 5;
scope.chooseEgg('Cactus');
scope.choosePotion('Base');
expect(user.items.eggs).to.eql({Cactus: 0});
expect(user.items.hatchingPotions).to.eql({Base: 0});
expect(user.items.pets).to.eql({'Cactus-Base': 5});
expect(scope.selectedEgg).to.eql(null);
expect(scope.selectedPotion).to.eql(null);
expect(rootScope.openModal).to.have.been.calledOnce;
scope.chooseEgg('Cactus');
scope.choosePotion('Base');
expect(rootScope.openModal).to.not.have.been.calledTwice;
expect(rootScope.openModal).to.not.have.been.called;
});
it('does not show modal if user tries to hatch a premium quest pet', function(){
user.items.eggs = {Snake: 1};
user.items.hatchingPotions = {Peppermint: 1};
scope.chooseEgg('Snake');
scope.choosePotion('Peppermint');
expect(rootScope.openModal).to.not.have.been.called;
});
it('does not show pet hatching modal if user has opted out', function(){