From: Arundathi Patil Date: Tue, 31 Jul 2018 09:08:10 +0000 (+0530) Subject: Test cases - build-artifacts component X-Git-Tag: 1.4.0~75 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F58197%2F3;p=appc%2Fcdt.git 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 --- 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); + }); });