Correct test assertion

This commit is contained in:
Blade Barringer
2015-09-15 17:38:22 -05:00
parent 9abe67b0ad
commit a655242c49
2 changed files with 2 additions and 2 deletions

View File

@@ -207,7 +207,7 @@ describe('Groups Controller', function() {
expect(group.leave).to.not.be.called; expect(group.leave).to.not.be.called;
expect(res.json).to.be.calledOnce; expect(res.json).to.be.calledOnce;
expect(res.json).to.be.calledWith(403, 'You cannot leave when you have started a quest. Abort the quest first.'); expect(res.json).to.be.calledWith(403, 'You cannot leave your party when you have started a quest. Abort the quest first.');
}); });
it('leaves party if quest is not active', function() { it('leaves party if quest is not active', function() {

View File

@@ -507,7 +507,7 @@ api.leave = function(req, res, next) {
if (group.type === 'party') { if (group.type === 'party') {
if (group.quest && group.quest.leader === user._id) { if (group.quest && group.quest.leader === user._id) {
return res.json(403, 'You cannot leave party when you have started a quest. Abort the quest first.'); return res.json(403, 'You cannot leave your party when you have started a quest. Abort the quest first.');
} }
if (group.quest && group.quest.active && group.quest.members && group.quest.members[user._id]) { if (group.quest && group.quest.active && group.quest.members && group.quest.members[user._id]) {