mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-08-07 15:40:58 +02:00
Merge pull request #921 from mleanos/dbseed-user-passwords
[hotfix] Fixes db seed password bug
This commit is contained in:
@@ -228,6 +228,22 @@ describe('User Model Unit Tests:', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('should validate a randomly generated passphrase from the static schema method', function () {
|
||||
var _user1 = new User(user1);
|
||||
|
||||
User.generateRandomPassphrase()
|
||||
.then(function (password) {
|
||||
_user1.password = password;
|
||||
_user1.validate(function (err) {
|
||||
should.not.exist(err);
|
||||
});
|
||||
})
|
||||
.catch(function (err) {
|
||||
should.not.exist(err);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('should validate when the password is undefined', function () {
|
||||
var _user1 = new User(user1);
|
||||
_user1.password = undefined;
|
||||
|
||||
Reference in New Issue
Block a user