move logic to model code
This commit is contained in:
+19
-1
@@ -1,4 +1,3 @@
|
||||
/* jslint node:true */
|
||||
/* global it:false */
|
||||
/* global describe:false */
|
||||
/* global before:false */
|
||||
@@ -678,4 +677,23 @@ describe('User', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('remove', function () {
|
||||
before(createOwner);
|
||||
after(cleanupUsers);
|
||||
|
||||
it('fails for unkown user', function (done) {
|
||||
user.remove('unknown', { }, function (error) {
|
||||
expect(error.reason).to.be(UserError.NOT_FOUND);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('can remove valid user', function (done) {
|
||||
user.remove(userObject.id, { }, function (error) {
|
||||
expect(error).to.be(null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user