mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Send back 204 from questLeave route
This commit is contained in:
@@ -54,7 +54,8 @@ describe('Groups Controller', function() {
|
||||
group: group,
|
||||
user: user
|
||||
},
|
||||
json: sinon.stub()
|
||||
json: sinon.stub(),
|
||||
send: sinon.stub()
|
||||
};
|
||||
|
||||
req = { };
|
||||
@@ -121,11 +122,11 @@ describe('Groups Controller', function() {
|
||||
expect(group.quest.members[user._id]).to.not.exist;
|
||||
});
|
||||
|
||||
it('sends back 201 on success', function() {
|
||||
it('sends back 204 on success', function() {
|
||||
groupsController.questLeave(req, res);
|
||||
|
||||
expect(res.json).to.be.calledOnce;
|
||||
expect(res.json).to.be.calledWith(201);
|
||||
expect(res.send).to.be.calledOnce;
|
||||
expect(res.send).to.be.calledWith(204);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user