mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix Upload tests
This commit is contained in:
@@ -21,39 +21,40 @@ export class AlfrescoApiMock {
|
|||||||
return {authentications: {basicAuth: {password: 'fake-password', type: 'fake-basic', username: 'fake-user'}}};
|
return {authentications: {basicAuth: {password: 'fake-password', type: 'fake-basic', username: 'fake-user'}}};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
static get NodesApi() {
|
||||||
export module AlfrescoApiMock {
|
return NodesApiMock;
|
||||||
|
}
|
||||||
export class NodesApi {
|
|
||||||
|
}
|
||||||
constructor(alfrescoClient: any) {
|
|
||||||
}
|
export class NodesApiMock {
|
||||||
|
|
||||||
addNode(nodeId, nodeBody, opts) {
|
constructor(alfrescoClient: any) {
|
||||||
if (nodeId && nodeBody.name !== 'folder-duplicate-fake') {
|
}
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
resolve({
|
addNode(nodeId, nodeBody, opts) {
|
||||||
entry: {
|
if (nodeId && nodeBody.name !== 'folder-duplicate-fake') {
|
||||||
isFile: false,
|
return new Promise(function (resolve, reject) {
|
||||||
isFolder: true
|
resolve({
|
||||||
}
|
entry: {
|
||||||
});
|
isFile: false,
|
||||||
});
|
isFolder: true
|
||||||
} else {
|
}
|
||||||
return new Promise(function (resolve, reject) {
|
});
|
||||||
reject({
|
});
|
||||||
response: {
|
} else {
|
||||||
body: {
|
return new Promise(function (resolve, reject) {
|
||||||
error: {
|
reject({
|
||||||
statusCode: 409
|
response: {
|
||||||
}
|
body: {
|
||||||
}
|
error: {
|
||||||
}
|
statusCode: 409
|
||||||
});
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user