Allow eventId in notifications table to be null

This commit is contained in:
Johannes Zellner
2019-02-06 14:39:25 +01:00
parent abc8e1c377
commit 0cca838db9
3 changed files with 39 additions and 2 deletions

View File

@@ -163,6 +163,14 @@ describe('database', function () {
action: 'usually a url'
};
var NOTIFICATION_3 = {
userId: USER_0.id,
eventId: null,
title: 'third one',
message: 'some message there',
action: 'usually a url'
};
before(function (done) {
async.series([
userdb.add.bind(null, USER_0.id, USER_0),
@@ -286,6 +294,14 @@ describe('database', function () {
done();
});
});
it('can add notification without eventId', function (done) {
notificationdb.add(NOTIFICATION_3, function (error) {
expect(error).to.equal(null);
done();
});
});
});
describe('domains', function () {