diff options
author | 2018-07-30 15:51:36 +0530 | |
---|---|---|
committer | 2018-08-02 19:54:55 +0000 | |
commit | 1ff02a5105137098ff17dda635f121e4e0036095 (patch) | |
tree | fc7cab083da623e6fbbcf80ca49476015eef8e63 /src/app/shared | |
parent | 88f1b13348515f6d32ad325a289a07bf0ba7fc27 (diff) |
Test cases - UtilityService
Wrote test cases in uitilityService to cover processApiSubscribe
function
Issue-ID: APPC-1064
Change-Id: Id6852114581a761550f49fa59e749140d377f0fc
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/app/shared')
-rw-r--r-- | src/app/shared/services/utilityService/utility.service.spec.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app/shared/services/utilityService/utility.service.spec.ts b/src/app/shared/services/utilityService/utility.service.spec.ts index 85b4818..e35bfed 100644 --- a/src/app/shared/services/utilityService/utility.service.spec.ts +++ b/src/app/shared/services/utilityService/utility.service.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 @@ -62,5 +64,13 @@ describe('UtilityService', () => { expect(service.checkResult(data)).toBeTruthy(); })); + it('should retrive failure message on status 401', inject([UtilityService], (service: UtilityService) => { + let result = { output: {status: {code: '401'}}}; + service.processApiSubscribe(result, 'getArtifact', ''); + })); + it('should set success message on status 400', inject([UtilityService], (service: UtilityService) => { + let result = { output: {status: {code: '400'}}}; + service.processApiSubscribe(result, 'getArtifact', ''); + })); }); |