Adds status to the user and tests on setStatus.

This commit is contained in:
gaba
2016-11-16 12:44:34 -08:00
parent 7165b179bc
commit bc3f9bb0b4
2 changed files with 49 additions and 1 deletions
+14
View File
@@ -63,4 +63,18 @@ describe('User: models', () => {
});
});
describe('#setStatus', () => {
it('should set the status to banned', () => {
return User
.setStatus(mockUsers[0].id, 'banned')
.then(() => {
User.findById(mockUsers[0].id)
.then((user) => {
expect(user).to.have.property('status')
.and.to.equal('banned');
});
});
});
});
});