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;
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ RoleFunctionsComponent ]
- })
+ declarations: [ RoleFunctionsComponent ]
+ })
.compileComponents();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
+
+it('should test getDismissReason function', inject([AdminService],(adminservice) => {
+ component.getRoleFunctions();
+ expect(adminservice.getRoleFunctionsList).toHaveBeenCalled();
+ }));
});