Added checks for notification properties

refs https://linear.app/tryghost/issue/CORE-64/resolve-undissmissable-update-notification-banners

- Before introducing new properties made sure existing ones were well understood and tested in a basic way
This commit is contained in:
Naz 2021-10-07 18:24:05 +02:00 committed by naz
parent 361184fc1c
commit 53ae852a0e

View File

@ -175,7 +175,7 @@ describe('Notifications Service', function () {
createdAt: moment().toDate(),
status: 'alert',
type: 'info',
dismissible: true,
dismissible: false,
top: true,
message: 'Hello test world!'
}]
@ -183,6 +183,17 @@ describe('Notifications Service', function () {
allNotifications.length.should.equal(0);
notificationsToAdd.length.should.equal(1);
const createdNotification = notificationsToAdd[0];
createdNotification.id.should.not.be.undefined();
createdNotification.custom.should.be.true();
createdNotification.createdAt.should.not.be.undefined();
createdNotification.status.should.equal('alert');
createdNotification.type.should.equal('info');
createdNotification.dismissible.should.be.false();
createdNotification.top.should.be.true();
createdNotification.message.should.equal('Hello test world!');
});
});