mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-12 15:05:30 +00:00
parent
4fc04fea24
commit
11fcb54c03
2 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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'});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue