From: Rupinder Date: Thu, 23 Jan 2020 10:04:33 +0000 (+0530) Subject: Added test case for role-function-component X-Git-Tag: 3.0.0~109 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8e61d9596e629d540a34a0f1cf3ed096ef52e4a1;p=portal%2Fsdk.git Added test case for role-function-component Written test case for role-functions component Issue-ID: PORTAL-808 Change-Id: I34e29fe8ddd32534deccf31c18d0bee797855fe9 Signed-off-by: Rupinder --- diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts index a03f2e71..24396996 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts @@ -1,6 +1,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RoleFunctionsComponent } from './role-functions.component'; +import { AdminService } from '../admin.service'; +import { inject } from '@angular/core/testing'; describe('RoleFunctionsComponent', () => { let component: RoleFunctionsComponent; @@ -8,8 +10,8 @@ describe('RoleFunctionsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ RoleFunctionsComponent ] - }) + declarations: [ RoleFunctionsComponent ] + }) .compileComponents(); })); @@ -22,4 +24,9 @@ describe('RoleFunctionsComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); + +it('should test getDismissReason function', inject([AdminService],(adminservice) => { + component.getRoleFunctions(); + expect(adminservice.getRoleFunctionsList).toHaveBeenCalled(); + })); });