Skip to content

Commit 91e6e13

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
checks assertion
1 parent 04ba602 commit 91e6e13

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

test/upload.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,29 +1339,4 @@ describe("File upload", function () {
13391339
expect(callback.calledOnce).to.be.true;
13401340
sinon.assert.calledWith(callback, null, uploadSuccessResponseObj);
13411341
});
1342-
1343-
it("Should return error for unsuccessfull check", async function () {
1344-
const fileOptions = {
1345-
...securityParameters,
1346-
fileName: "test_file_name",
1347-
file: "test_file",
1348-
responseFields: "tags, customCoordinates, isPrivateFile, metadata",
1349-
useUniqueFileName: false,
1350-
checks: "'request.folder' : 'marketing/'",
1351-
};
1352-
var callback = sinon.spy();
1353-
1354-
imagekit.upload(fileOptions, callback);
1355-
1356-
expect(server.requests.length).to.be.equal(1);
1357-
await sleep();
1358-
var errRes = {
1359-
help: "For support kindly contact us at [email protected] .",
1360-
message: "Your request failed 'checks' validation.",
1361-
};
1362-
errorUploadResponse(400, errRes);
1363-
await sleep();
1364-
expect(callback.calledOnce).to.be.true;
1365-
sinon.assert.calledWith(callback, errRes, null);
1366-
});
13671342
});

0 commit comments

Comments
 (0)