diff --git a/test/notification-system.test.js b/test/notification-system.test.js index 2996757..e3aab6f 100644 --- a/test/notification-system.test.js +++ b/test/notification-system.test.js @@ -228,6 +228,19 @@ describe('Notification Component', function() { done(); }); + it('should accept an action without callback function defined', done => { + notificationObj.action = { + label: 'Click me' + }; + + component.addNotification(notificationObj); + let button = TestUtils.findRenderedDOMComponentWithClass(instance, 'notification-action-button'); + TestUtils.Simulate.click(button); + let notification = TestUtils.scryRenderedDOMComponentsWithClass(instance, 'notification'); + expect(notification.length).toEqual(0); + done(); + }); + it('should execute a callback function on add a notification', done => { let testThis = false; notificationObj.onAdd = function() {