Add notification tests for business logic

This commit is contained in:
Johannes Zellner
2019-01-04 17:13:52 +01:00
parent 808be96de3
commit b9daa62ece
3 changed files with 167 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ exports = module.exports = {
add: add,
get: get,
ack: ack,
listPaged: listPaged,
getAllPaged: getAllPaged,
// specialized notifications
userAdded: userAdded
@@ -95,7 +95,7 @@ function ack(id, callback) {
}
// if acknowledged === null we return all, otherwise yes or no based on acknowledged as a boolean
function listPaged(userId, acknowledged, page, perPage, callback) {
function getAllPaged(userId, acknowledged, page, perPage, callback) {
assert.strictEqual(typeof userId, 'string');
assert(acknowledged === null || typeof acknowledged === 'boolean');
assert.strictEqual(typeof page, 'number');