diff --git a/test/spec/controllers/notificationCtrlSpec.js b/test/spec/controllers/notificationCtrlSpec.js index 9d53e7946a..1f0ceff107 100644 --- a/test/spec/controllers/notificationCtrlSpec.js +++ b/test/spec/controllers/notificationCtrlSpec.js @@ -39,7 +39,7 @@ describe('Notification Controller', function() { it('does not open quest invitation modal if RSVPNeeded is not true', function() { user.party.quest.RSVPNeeded = false; - user.party.quest.completed = false; + user.party.quest.completed = "hedgebeast"; scope.$digest(); expect(rootScope.openModal).to.not.be.called; @@ -47,7 +47,7 @@ describe('Notification Controller', function() { it('does not open quest invitation modal if quest completed is set to false', function() { user.party.quest.RSVPNeeded = true; - user.party.quest.completed = false; + user.party.quest.completed = "hedgebeast"; scope.$digest(); expect(rootScope.openModal).to.not.be.called; @@ -55,7 +55,7 @@ describe('Notification Controller', function() { it('does not open quest invitation modal if quest completed is set to true', function() { user.party.quest.RSVPNeeded = true; - user.party.quest.completed = true; + user.party.quest.completed = "hedgebeast"; scope.$digest(); expect(rootScope.openModal).to.not.be.called; diff --git a/website/public/js/controllers/notificationCtrl.js b/website/public/js/controllers/notificationCtrl.js index 1d1be29443..6df84a241a 100644 --- a/website/public/js/controllers/notificationCtrl.js +++ b/website/public/js/controllers/notificationCtrl.js @@ -154,7 +154,7 @@ habitrpg.controller('NotificationCtrl', }); // Quest invitation modal - $scope.$watch('user.party.quest.RSVPNeeded && (user.party.quest.completed !== false && user.party.quest.completed !== true)', function(after, before){ + $scope.$watch('user.party.quest.RSVPNeeded && !user.party.quest.completed', function(after, before){ if (after != true) return; $rootScope.openModal('questInvitation', {controller:'PartyCtrl'}); });