Skip to content

Commit 7929b62

Browse files
author
RTLcoil
authored
Change test for eval upload parameter (#468)
1 parent 636ccb9 commit 7929b62

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

test/integration/api/uploader/uploader_spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,18 +1146,17 @@ describe("uploader", function () {
11461146
});
11471147

11481148
it('should add the eval parameter to an uploaded asset', async () => {
1149-
const testEvalTagsResult = ['a', 'b'];
11501149
const result = await UPLOADER_V2.upload(IMAGE_FILE, {
11511150
tags: [TEST_TAG],
11521151
eval: TEST_EVAL_STR
11531152
});
11541153

11551154
expect(result).not.to.be.empty();
1156-
expect(result.tags).to.be.an("array");
1157-
expect(result.tags).to.eql(testEvalTagsResult);
11581155
expect(result.context).to.be.an("object");
11591156
expect(result.context.custom).to.be.an("object");
11601157
expect(result.context.custom.width).to.eql(TEST_IMG_WIDTH);
1158+
expect(result.quality_analysis).to.be.an("object");
1159+
expect(result.quality_analysis.focus).to.be.an("number");
11611160
});
11621161

11631162
describe("sign requests", function () {

test/testUtils/testConstants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const UNIQUE_TEST_FOLDER = `${TEST_TAG}_${UNIQUE_JOB_SUFFIX_ID}_folder`;
1616
const TEST_IMG_WIDTH = 241;
1717
const TEST_CLOUD_NAME = process.env.CLOUDINARY_URL.split('@')[1];
1818

19-
const TEST_EVAL_STR = 'if (resource_info["width"] < 450) { upload_options["tags"] = "a,b" }; ' +
19+
const TEST_EVAL_STR = 'if (resource_info["width"] < 450) { upload_options["quality_analysis"] = true }; ' +
2020
'upload_options["context"] = "width=" + resource_info["width"]';
2121
module.exports = {
2222
TEST_TAG_PREFIX,

0 commit comments

Comments
 (0)