Fix test after changes for failure notification on updateEPerson

This commit is contained in:
Marie Verdonck
2020-03-16 19:01:06 +01:00
parent 2cb6ba98ce
commit 30d46bedf2
2 changed files with 4 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ describe('EPeopleRegistryComponent', () => {
it('first ePerson is deleted', () => { it('first ePerson is deleted', () => {
expect(ePeopleIdsFoundBeforeDelete.length === ePeopleIdsFoundAfterDelete + 1); expect(ePeopleIdsFoundBeforeDelete.length === ePeopleIdsFoundAfterDelete + 1);
ePeopleIdsFoundAfterDelete.forEach((epersonElement) => { ePeopleIdsFoundAfterDelete.forEach((epersonElement) => {
expect(epersonElement.nativeElement.textContent !== ePeopleIdsFoundBeforeDelete[0].nativeElement.textContent).toBeTrue(); expect(epersonElement !== ePeopleIdsFoundBeforeDelete[0].nativeElement.textContent).toBeTrue();
}); });
}); });
}); });

View File

@@ -146,9 +146,10 @@ export class EPersonDataService extends DataService<EPerson> {
map((oldEPerson: EPerson) => { map((oldEPerson: EPerson) => {
const operations = this.generateOperations(oldEPerson, ePerson); const operations = this.generateOperations(oldEPerson, ePerson);
const patchRequest = new PatchRequest(requestId, ePerson._links.self.href, operations); const patchRequest = new PatchRequest(requestId, ePerson._links.self.href, operations);
this.requestService.configure(patchRequest); return this.requestService.configure(patchRequest);
}), }),
); take(1)
).subscribe();
return this.fetchResponse(requestId); return this.fetchResponse(requestId);
} }