diff options
author | 2020-01-23 15:34:33 +0530 | |
---|---|---|
committer | 2020-01-23 15:39:23 +0530 | |
commit | 8e61d9596e629d540a34a0f1cf3ed096ef52e4a1 (patch) | |
tree | b5cf5fd9709bc3ebbe5bd08625a7e692ee0c765b /ecomp-sdk/epsdk-app-overlay/src | |
parent | 28af72fc23a1e0cb67e1ac1b5fac6b6d9020270a (diff) |
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 <rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/role-functions/role-functions.component.spec.ts | 11 |
1 files changed, 9 insertions, 2 deletions
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(); + })); }); |