mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-12332] Add checkout and cancel-checkout node support (#12133)
* [ACS-12332] Add checkout and cancel-checkout node support * [ACS-12332] cr fix
This commit is contained in:
@@ -141,6 +141,30 @@ describe('Node', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('Checkout', () => {
|
||||
it('should POST to the checkout endpoint', async () => {
|
||||
nodeMock.post200CheckoutNode('fake-node-id');
|
||||
const result = await nodesApi.checkoutNode('fake-node-id');
|
||||
assert.ok(result.entry, 'cancelCheckoutNode should return a NodeEntry');
|
||||
});
|
||||
|
||||
it('should throw if nodeId is not defined', () => {
|
||||
assert.throws(() => nodesApi.checkoutNode(undefined));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Cancel Checkout', () => {
|
||||
it('should POST to the cancel-checkout endpoint', async () => {
|
||||
nodeMock.post200CancelCheckoutNode('fake-node-id');
|
||||
const result = await nodesApi.cancelCheckoutNode('fake-node-id');
|
||||
assert.ok(result.entry, 'checkoutNode should return a NodeEntry');
|
||||
});
|
||||
|
||||
it('should throw if nodeId is not defined', () => {
|
||||
assert.throws(() => nodesApi.cancelCheckoutNode(undefined));
|
||||
});
|
||||
});
|
||||
|
||||
describe('FolderInformation', () => {
|
||||
it('should return jobId on initiateFolderSizeCalculation API call if everything is ok', async () => {
|
||||
nodeMock.post200ResponseInitiateFolderSizeCalculation();
|
||||
|
||||
Reference in New Issue
Block a user