mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 19:43:04 +00:00
[DSC-76] Delete pending json patch operations
This commit is contained in:
@@ -17,6 +17,7 @@ import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { JsonPatchOperationsEntry, JsonPatchOperationsResourceEntry } from './json-patch-operations.reducer';
|
||||
import {
|
||||
CommitPatchOperationsAction,
|
||||
DeletePendingJsonPatchOperationsAction,
|
||||
RollbacktPatchOperationsAction,
|
||||
StartTransactionPatchOperationsAction
|
||||
} from './json-patch-operations.actions';
|
||||
@@ -288,4 +289,19 @@ describe('JsonPatchOperationsService test suite', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('deletePendingJsonPatchOperations', () => {
|
||||
beforeEach(() => {
|
||||
store.dispatch.and.callFake(() => { /* */ });
|
||||
});
|
||||
|
||||
it('should dispatch a new DeletePendingJsonPatchOperationsAction', () => {
|
||||
|
||||
const expectedAction = new DeletePendingJsonPatchOperationsAction();
|
||||
scheduler.schedule(() => service.deletePendingJsonPatchOperations());
|
||||
scheduler.flush();
|
||||
|
||||
expect(store.dispatch).toHaveBeenCalledWith(expectedAction);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user