Allow eventId in notifications table to be null
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user