mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[Task 72956] improvement to the spyOn in EPersonFormComponent test
This commit is contained in:
@@ -319,7 +319,7 @@ describe('EPersonFormComponent', () => {
|
|||||||
|
|
||||||
it ('should call the epersonService delete when clicked on the button' , () => {
|
it ('should call the epersonService delete when clicked on the button' , () => {
|
||||||
// ePersonDataServiceStub.activeEPerson = eperson;
|
// ePersonDataServiceStub.activeEPerson = eperson;
|
||||||
spyOn(component.epersonService, 'deleteEPerson').and.stub();
|
spyOn(component.epersonService, 'deleteEPerson').and.returnValue(observableOf(new RestResponse(true, 204, 'No Content')));
|
||||||
const deleteButton = fixture.debugElement.query(By.css('.delete-button'));
|
const deleteButton = fixture.debugElement.query(By.css('.delete-button'));
|
||||||
expect(deleteButton.nativeElement.disabled).toBe(false);
|
expect(deleteButton.nativeElement.disabled).toBe(false);
|
||||||
deleteButton.triggerEventHandler('click', null);
|
deleteButton.triggerEventHandler('click', null);
|
||||||
|
Reference in New Issue
Block a user