From e9aea50182e65fa515548d3f27bbca42829b5e23 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 6 Aug 2018 16:43:28 +0530 Subject: utility service : added test case wrote test case to cover processApiSubscribe function on artifact upload Issue-ID: APPC-1064 Change-Id: I9e01f6c9e9a099a5fff44924ed4158efeb56d467 Signed-off-by: Arundathi Patil --- .../shared/services/utilityService/utility.service.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/app/shared') diff --git a/src/app/shared/services/utilityService/utility.service.spec.ts b/src/app/shared/services/utilityService/utility.service.spec.ts index e35bfed..4054a89 100644 --- a/src/app/shared/services/utilityService/utility.service.spec.ts +++ b/src/app/shared/services/utilityService/utility.service.spec.ts @@ -18,8 +18,6 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ @@ -73,4 +71,14 @@ describe('UtilityService', () => { let result = { output: {status: {code: '400'}}}; service.processApiSubscribe(result, 'getArtifact', ''); })); + + it('should set warning message on status 401 and artifact upload', inject([UtilityService], (service: UtilityService) => { + let result = { output: {status: {code: '401'}}}; + service.processApiSubscribe(result, 'uploadArtifact', ''); + })); + + it('should set suceess message on status 400 and artifact upload', inject([UtilityService], (service: UtilityService) => { + let result = { output: {status: {code: '400'}}}; + service.processApiSubscribe(result, 'uploadArtifact', ''); + })); }); -- cgit 1.2.3-korg