mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
test(modals): Rehatch scenario
This commit is contained in:
@@ -79,6 +79,15 @@ describe('Inventory Controller', function() {
|
|||||||
expect(rootScope.openModal).to.have.been.calledWith('hatchPet');
|
expect(rootScope.openModal).to.have.been.calledWith('hatchPet');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('shows modal even if user has raised that pet to a mount', function(){
|
||||||
|
user.items.pets['Cactus-Base'] = -1;
|
||||||
|
scope.chooseEgg('Cactus');
|
||||||
|
scope.choosePotion('Base');
|
||||||
|
|
||||||
|
expect(rootScope.openModal).to.have.been.calledOnce;
|
||||||
|
expect(rootScope.openModal).to.have.been.calledWith('hatchPet');
|
||||||
|
});
|
||||||
|
|
||||||
it('does not show modal if user tries to hatch a pet they own', function(){
|
it('does not show modal if user tries to hatch a pet they own', function(){
|
||||||
scope.chooseEgg('Cactus');
|
scope.chooseEgg('Cactus');
|
||||||
scope.choosePotion('Base');
|
scope.choosePotion('Base');
|
||||||
|
|||||||
Reference in New Issue
Block a user