From e196dc483c18126715e00b6345de678d0fbf73ca Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 13 Aug 2018 15:18:33 +0530 Subject: Mapping-editor service- added test case Wrote test case to cover handleKetCompletion function in mapping-editor service. Issue-ID: APPC-1064 Change-Id: Iefb8e1d5dca1fedbcb6e50d9733ead46d6b5ee0e Signed-off-by: Arundathi Patil --- src/app/shared/services/mapping-editor.service.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/shared/services/mapping-editor.service.spec.ts b/src/app/shared/services/mapping-editor.service.spec.ts index 212508f..cce5dfa 100644 --- a/src/app/shared/services/mapping-editor.service.spec.ts +++ b/src/app/shared/services/mapping-editor.service.spec.ts @@ -307,5 +307,11 @@ describe('MappingEditorService', () => { let value = service.getKeysForValues('value'); expect(value).toBe('Value'); }); + + it('should call refreshEditor() function', ()=> { + let spy = spyOn(MappingEditorService.prototype, 'refreshEditor'); + service.handlekeyCompletion(); + expect(spy).toHaveBeenCalled(); + }); }); -- cgit 1.2.3-korg