mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-25 08:00:31 +02:00
Wait for async saving and removing
This commit is contained in:
@@ -52,10 +52,11 @@ describe('User Model Unit Tests:', function() {
|
||||
});
|
||||
|
||||
it('should fail to save an existing user again', function(done) {
|
||||
user.save();
|
||||
return user2.save(function(err) {
|
||||
should.exist(err);
|
||||
done();
|
||||
user.save(function() {
|
||||
user2.save(function(err) {
|
||||
should.exist(err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -69,7 +70,6 @@ describe('User Model Unit Tests:', function() {
|
||||
});
|
||||
|
||||
after(function(done) {
|
||||
User.remove().exec();
|
||||
done();
|
||||
User.remove().exec(done);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user