Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "abk-user", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Abakio User Logic", | ||
@@ -5,0 +5,0 @@ "main": "src/user.logic.js", |
@@ -35,2 +35,8 @@ module.exports = userLogic; | ||
if (typeof next !== 'function') { | ||
throw new Error('Parameter must be a function which return error or result'); | ||
} | ||
var result = { | ||
@@ -62,2 +68,8 @@ | ||
if (typeof next !== 'function') { | ||
throw new Error('Parameter must be a function which return error or result'); | ||
} | ||
var parameters = { | ||
@@ -64,0 +76,0 @@ |
@@ -134,2 +134,25 @@ var Lab = require('lab'), | ||
}); | ||
lab.test('should throw an exception if parameter is not a callback', function (done) { | ||
var user = new UserLogic(attributes); | ||
var newPassword = function () { | ||
user.encryptPassword(); | ||
} | ||
var checkPassword = function () { | ||
user.checkPassword(); | ||
} | ||
expect(newPassword).to.throw(); | ||
expect(checkPassword).to.throw(); | ||
done(); | ||
}); | ||
@@ -136,0 +159,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9480
178