mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
[DSC-76] Delete pending json patch operations
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as deepFreeze from 'deep-freeze';
|
||||
|
||||
import {
|
||||
CommitPatchOperationsAction,
|
||||
CommitPatchOperationsAction, DeletePendingJsonPatchOperationsAction,
|
||||
FlushPatchOperationsAction,
|
||||
NewPatchAddOperationAction,
|
||||
NewPatchRemoveOperationAction,
|
||||
@@ -323,4 +323,19 @@ describe('jsonPatchOperationsReducer test suite', () => {
|
||||
|
||||
});
|
||||
|
||||
describe('When DeletePendingJsonPatchOperationsAction has been dispatched', () => {
|
||||
it('should set set the JsonPatchOperationsState to null ', () => {
|
||||
const action = new DeletePendingJsonPatchOperationsAction();
|
||||
initState = Object.assign({}, testState, {
|
||||
[testJsonPatchResourceType]: Object.assign({}, testState[testJsonPatchResourceType], {
|
||||
transactionStartTime: startTimestamp,
|
||||
commitPending: true
|
||||
})
|
||||
});
|
||||
const newState = jsonPatchOperationsReducer(initState, action);
|
||||
|
||||
expect(newState).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user