import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component';
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component';
+import 'rxjs/add/observable/of';
+
describe('NewRoleFunctionComponent', () => {
let component: NewRoleFunctionComponent;
})
TestBed.overrideModule(BrowserDynamicTestingModule,{
set:{
- entryComponents:[ConfirmationModalComponent,InformationModalComponent]
+ entryComponents:[
+ ConfirmationModalComponent,
+ InformationModalComponent
+ ]
}
})
.compileComponents();
});
it('should test ngOnInit method',()=>{
+ component.editRoleFunction={
+ type: "type",
+ code: "code",
+ action: "action",
+ name: "name"
+ }
+ component.ngOnInit();
+ })
+
+ it('should test else part of ngOnInit method',()=>{
+ component.editRoleFunction={
+ type: "menu",
+ code: "code",
+ action: "action",
+ name: "name"
+ }
component.ngOnInit();
})
})
it('should test openConfirmationModal method',()=>{
- component.openConfirmationModal("indrijeet","kumar")
+ component.openConfirmationModal("indrijeet","kumar");
})
+
});