From 50883a6d3cb0ce19febbcacb53cbd493e895d098 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 31 Jul 2018 14:38:10 +0530 Subject: Test cases - build-artifacts component Wrote test cases to cover updateAccessUpdatePages method in build-artifacts component. Issue-ID: APPC-1064 Change-Id: If654c89d1daf1d9639aa172c08f3270b6337ba0e Signed-off-by: Arundathi Patil --- .../vnfs/build-artifacts/build-artifacts.component.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts b/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts index a1b4507..a6ba8c3 100644 --- a/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts +++ b/src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts @@ -2,6 +2,8 @@ ============LICENSE_START========================================== =================================================================== Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + +Modification Copyright (C) 2018 IBM. =================================================================== Unless otherwise specified, all software contained herein is licensed @@ -145,4 +147,16 @@ describe('BuildDesignComponent', () => { expect(spy).toHaveBeenCalled(); }); + + it('Should test updateAccessUpdatePages method to call setAllowOtherUpdates with true', ()=> { + spyOn(component, 'setAllowOtherUpdates'); + component.updateAccessUpdatePages('config', [{'action' : 'configModify'}, {'action' : 'config'}]); + expect(component.setAllowOtherUpdates).toHaveBeenCalledWith(true); + }); + + it('Should test updateAccessUpdatePages method to call setAllowOtherUpdates with fasle', ()=> { + spyOn(component, 'setAllowOtherUpdates'); + component.updateAccessUpdatePages('config', [{'action' : 'configModify'}]); + expect(component.setAllowOtherUpdates).toHaveBeenCalledWith(false); + }); }); -- cgit 1.2.3-korg