Skip to content

Commit 4ebcb02

Browse files
author
Emmanouil Konstantinidis
committed
Complete navigation comp. tests (100%)
1 parent 326079f commit 4ebcb02

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/js/__tests__/components/navigation.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,21 @@ describe('Test for Navigation', function () {
107107

108108
});
109109

110+
it('Should test the interval on componentDidMount', function () {
111+
112+
spyOn(Actions, 'getNotifications');
113+
114+
AuthStore.authStatus = function () {
115+
return true;
116+
};
117+
118+
var instance = TestUtils.renderIntoDocument(<Navigation />);
119+
expect(instance.componentDidMount).toBeDefined();
120+
121+
// Should refresh on interval
122+
jest.runOnlyPendingTimers();
123+
expect(Actions.getNotifications).toHaveBeenCalled();
124+
125+
});
126+
110127
});

0 commit comments

Comments
 (0)