mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Modified 'RSVPNeeded is not true' test to not set user.party.quest.completed because it is not needed for the test
This commit is contained in:
@@ -39,12 +39,10 @@ describe('Notification Controller', function() {
|
|||||||
|
|
||||||
it('does not open quest invitation modal if RSVPNeeded is not true', function() {
|
it('does not open quest invitation modal if RSVPNeeded is not true', function() {
|
||||||
user.party.quest.RSVPNeeded = false;
|
user.party.quest.RSVPNeeded = false;
|
||||||
user.party.quest.completed = "hedgebeast";
|
delete user.party.quest.completed;
|
||||||
scope.$digest();
|
scope.$digest();
|
||||||
|
|
||||||
// Completion modal should open, but should be the only modal that opens
|
expect(rootScope.openModal).to.not.be.called;
|
||||||
expect(rootScope.openModal).to.be.calledOnce;
|
|
||||||
expect(rootScope.openModal).to.be.calledWith('questCompleted', {controller:'InventoryCtrl'});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not open quest invitation modal if quest.completed contains a quest key', function() {
|
it('does not open quest invitation modal if quest.completed contains a quest key', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user