diff --git a/clients/tests/unit/render/fileUploads.js b/clients/tests/unit/render/fileUploads.js deleted file mode 100644 index d248fbdb5..000000000 --- a/clients/tests/unit/render/fileUploads.js +++ /dev/null @@ -1,30 +0,0 @@ -import {removeFromBlocking, removeFromPending, removeFromUploadStarted} from "../../../render/util"; - -export const handleFileUploadResponse = (response,cf2,$form,messages,field) => { - const {fieldId} = field; - if( 'object' !== typeof response ){ - removeFromUploadStarted(fieldId,cf2); - removeFromPending(fieldId,cf2); - throw 'Upload Error'; - } - else if (response.hasOwnProperty('control')) { - removeFromPending(fieldId,cf2); - removeFromBlocking(fieldId,cf2); - cf2.uploadCompleted.push(fieldId); - $form.submit(); - }else{ - if( response.hasOwnProperty('message') ){ - messages[field.fieldIdAttr] = { - error: true, - message: response.hasOwnProperty('message') ? response.message : 'Invalid' - }; - } - removeFromUploadStarted(fieldId,cf2); - removeFromPending(fieldId,cf2); - throw response; - } -}; - -export const handleFileUploadError = (error) => { - -}; diff --git a/clients/tests/unit/render/fileUploads.test.js b/clients/tests/unit/render/fileUploads.test.js index a0704acd2..fc415bf77 100644 --- a/clients/tests/unit/render/fileUploads.test.js +++ b/clients/tests/unit/render/fileUploads.test.js @@ -1,4 +1,4 @@ -import {handleFileUploadResponse} from "./fileUploads"; +import {handleFileUploadResponse} from "../../../render/fileUploads"; import {cf2, obj} from './Mocks/mockUtils';