diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-07-31 14:38:10 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-08-02 19:54:19 +0000 |
commit | 50883a6d3cb0ce19febbcacb53cbd493e895d098 (patch) | |
tree | 39187fffa0439ddc57bcc89fc3fcd9c18a9bfbde | |
parent | 30c6c5b9769e20a06b744c8abcdaebeda5a6a676 (diff) |
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 <arundpil@in.ibm.com>
-rw-r--r-- | src/app/vnfs/build-artifacts/build-artifacts.component.spec.ts | 14 |
1 files changed, 14 insertions, 0 deletions
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); + }); }); |