Change helper to reject only error message

This commit is contained in:
Blade Barringer
2015-10-24 22:23:30 -05:00
parent a0547b99ca
commit b763aedd29
8 changed files with 12 additions and 25 deletions

View File

@@ -16,13 +16,13 @@ describe('DELETE /user', () => {
it('deletes the user', (done) => {
api.del('/user')
.then((fetchedUser) => {
return api.get('/user')
return api.get('/user');
})
.then((deletedUser) => {
done('Unexpected user');
})
.catch((err) => {
expect(err.code).to.eql(401);
expect(err).to.eql('No user found.');
done();
});
});