Reinstate error code in resolve promise for api tests.

This commit is contained in:
Blade Barringer
2015-10-26 07:53:51 -05:00
parent 01914523e1
commit 04fbdaa107
8 changed files with 56 additions and 14 deletions
+4 -1
View File
@@ -86,7 +86,10 @@ describe('POST /groups/:id/leave', () => {
it('group is not accessible after leaving', () => {
return expect(api.post(`/groups/${group._id}/leave`).then((result) => {
return api.get(`/groups/${group._id}`);
})).to.be.rejectedWith('Group not found or you don\'t have access.');
})).to.eventually.be.rejected.and.eql({
code: 404,
text: 'Group not found or you don\'t have access.',
});
});
});