mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Fixes after merge with master
This commit is contained in:
@@ -289,14 +289,6 @@ describe('RequestService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('when forceBypassCache is true', () => {
|
||||
it('should call clearRequestsOnTheirWayToTheStore method', () => {
|
||||
spyOn(serviceAsAny, 'clearRequestsOnTheirWayToTheStore');
|
||||
service.configure(testPostRequest, true);
|
||||
expect(serviceAsAny.clearRequestsOnTheirWayToTheStore).toHaveBeenCalledWith(testPostRequest.href);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('isCachedOrPending', () => {
|
||||
@@ -467,37 +459,6 @@ describe('RequestService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('clearRequestsOnTheirWayToTheStore', () => {
|
||||
let request: GetRequest;
|
||||
|
||||
beforeEach(() => {
|
||||
request = testPatchRequest;
|
||||
});
|
||||
|
||||
describe('when there is no request entry', () => {
|
||||
it('should remove response from cache', () => {
|
||||
spyOn(service, 'getByHref').and.returnValue(observableOf(undefined));
|
||||
|
||||
serviceAsAny.clearRequestsOnTheirWayToTheStore(request.href);
|
||||
|
||||
expect(responseCache.remove).toHaveBeenCalledWith(request.href);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when there is a request entry and is not pending', () => {
|
||||
it('should remove response from cache and stop tracking the request', () => {
|
||||
spyOn(service, 'getByHref').and.returnValue(observableOf({responsePending: false}));
|
||||
|
||||
serviceAsAny.clearRequestsOnTheirWayToTheStore(request.href);
|
||||
|
||||
expect(responseCache.remove).toHaveBeenCalledWith(request.href);
|
||||
expect(serviceAsAny.requestsOnTheirWayToTheStore.includes(request.href)).toBeFalsy();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('isReusable', () => {
|
||||
describe('when the given UUID is has no value', () => {
|
||||
let reusable;
|
||||
|
Reference in New Issue
Block a user