From b8f1521cc426dcd7757387c5a9d7d3110c6908f2 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 13 Jun 2016 14:02:28 +0100 Subject: [PATCH] Fix unit tests --- .../src/components/document-list.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts index 0e4cd5390f..c54173632e 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.spec.ts @@ -132,6 +132,7 @@ describe('DocumentList', () => { it('should execute action with node', () => { let node = new MinimalNodeEntity(); + node.entry = new MinimalNodeEntryEntity(); let action = new ContentActionModel(); action.handler = function () { console.log('mock handler'); @@ -144,7 +145,7 @@ describe('DocumentList', () => { }); - it('should execute action without node provided', () => { + it('should not execute action without node provided', () => { let action = new ContentActionModel(); action.handler = function () { console.log('mock handler'); @@ -152,7 +153,7 @@ describe('DocumentList', () => { spyOn(action, 'handler').and.stub(); documentList.executeContentAction(null, action); - expect(action.handler).toHaveBeenCalledWith(null, documentList); + expect(action.handler).not.toHaveBeenCalled(); }); it('should update current folder path', () => {