pm25
Version:
Production process manager for Node.JS applications with a built-in load balancer.
21 lines (14 loc) • 496 B
JavaScript
var Password = require('../../lib/Interactor/Password.js');
var should = require('should');
describe('Password test', function() {
var crypted = '';
it('should crypt a password', function() {
crypted = Password.generate('testpass');
});
it('should fail with wrong password', function() {
Password.verify('testpasds', crypted).should.be.false;
});
it('should success with right password', function() {
Password.verify('testpass', crypted).should.be.true;
});
});