diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-09-11 16:15:34 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-09-11 15:05:03 +0000 |
commit | 9505e8651142677380f553a2bcadbeba097a2330 (patch) | |
tree | 3a9cdc03bebf9546932a1d60687a5540f085e685 /src | |
parent | eaa0dd2a148afd537cbe3961c5fa3e40b9221c94 (diff) |
reference-dataform.util- added test case
Wrote test case to test and cover checkResult function when status code
is 400
Issue-ID: APPC-1064
Change-Id: Ic951f3b83bd3ab68f4a6a14df2ad7aea88f5ad09
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts index 07ccc39..d18ee0b 100644 --- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts +++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts @@ -55,4 +55,12 @@ describe('ReferenceDataFormUtil', () => { expect(spy).toHaveBeenCalled(); expect(returnValue).toBe(false); })); + + it('should test checkResult function when status is 400', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => { + let spy = spyOn(NotificationsService.prototype, 'success'); + let result = {output: {status: { code: '400'}}}; + let returnValue = service.checkResult(result); + expect(spy).toHaveBeenCalled(); + expect(returnValue).toBe(true); + })); }); |