mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
Cache redesign part 2
This commit is contained in:
@@ -145,12 +145,12 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
expect((service as any).submitJsonPatchOperations).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should configure a new SubmissionPatchRequest', () => {
|
||||
it('should send a new SubmissionPatchRequest', () => {
|
||||
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
|
||||
scheduler.schedule(() => service.jsonPatchByResourceType(resourceEndpoint, resourceScope, testJsonPatchResourceType).subscribe());
|
||||
scheduler.flush();
|
||||
|
||||
expect(requestService.configure).toHaveBeenCalledWith(expected);
|
||||
expect(requestService.send).toHaveBeenCalledWith(expected);
|
||||
});
|
||||
|
||||
it('should dispatch a new StartTransactionPatchOperationsAction', () => {
|
||||
@@ -235,12 +235,12 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
expect((service as any).submitJsonPatchOperations).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should configure a new SubmissionPatchRequest', () => {
|
||||
it('should send a new SubmissionPatchRequest', () => {
|
||||
const expected = new SubmissionPatchRequest(requestService.generateRequestId(), resourceHref, patchOpBody);
|
||||
scheduler.schedule(() => service.jsonPatchByResourceID(resourceEndpoint, resourceScope, testJsonPatchResourceType, testJsonPatchResourceId).subscribe());
|
||||
scheduler.flush();
|
||||
|
||||
expect(requestService.configure).toHaveBeenCalledWith(expected);
|
||||
expect(requestService.send).toHaveBeenCalledWith(expected);
|
||||
});
|
||||
|
||||
it('should dispatch a new StartTransactionPatchOperationsAction', () => {
|
||||
|
@@ -85,7 +85,7 @@ export abstract class JsonPatchOperationsService<ResponseDefinitionDomain, Patch
|
||||
patchRequest$.pipe(
|
||||
filter((request: PatchRequestDefinition) => isNotEmpty(request.body)),
|
||||
tap(() => this.store.dispatch(new StartTransactionPatchOperationsAction(resourceType, resourceId, startTransactionTime))),
|
||||
tap((request: PatchRequestDefinition) => this.requestService.configure(request)),
|
||||
tap((request: PatchRequestDefinition) => this.requestService.send(request)),
|
||||
mergeMap(() => {
|
||||
return this.rdbService.buildFromRequestUUID(requestId).pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
|
Reference in New Issue
Block a user