@@ -18,7 +18,8 @@ const {
1818 PRESETS ,
1919 TRANSFORMATIONS ,
2020 PUBLIC_ID_PREFIX ,
21- UNIQUE_TEST_FOLDER
21+ UNIQUE_TEST_FOLDER ,
22+ TEST_EVAL_STR
2223} = testConstants ;
2324
2425const {
@@ -656,7 +657,8 @@ describe("api", function () {
656657 colors : true ,
657658 unsigned : true ,
658659 disallow_public_id : true ,
659- live : true
660+ live : true ,
661+ eval : TEST_EVAL_STR
660662 } ) ;
661663 var expectedPath = "/.*\/upload_presets/" + API_TEST_UPLOAD_PRESET3 + "$" ;
662664 sinon . assert . calledWith ( requestSpy , sinon . match ( {
@@ -667,6 +669,7 @@ describe("api", function () {
667669 sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'unsigned' , true , "unsigned=true" ) ) ) ;
668670 sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'disallow_public_id' , true , "disallow_public_id=true" ) ) ) ;
669671 sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'live' , true , "live=true" ) ) ) ;
672+ sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'eval' , TEST_EVAL_STR , `eval=${ TEST_EVAL_STR } ` ) ) ) ;
670673 } ) ;
671674 } ) ;
672675 it ( "should allow creating upload_presets" , function ( ) {
@@ -675,7 +678,8 @@ describe("api", function () {
675678 folder : "upload_folder" ,
676679 unsigned : true ,
677680 tags : UPLOAD_TAGS ,
678- live : true
681+ live : true ,
682+ eval : TEST_EVAL_STR
679683 } ) . then ( ( preset ) => {
680684 cloudinary . v2 . api . delete_upload_preset ( preset . name ) . catch ( ( err ) => {
681685 console . log ( err ) ;
@@ -685,6 +689,7 @@ describe("api", function () {
685689
686690 sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'unsigned' , true , "unsigned=true" ) ) ) ;
687691 sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'live' , true , "live=true" ) ) ) ;
692+ sinon . assert . calledWith ( writeSpy , sinon . match ( helper . apiParamMatcher ( 'eval' , TEST_EVAL_STR , `eval=${ TEST_EVAL_STR } ` ) ) ) ;
688693 } ) ;
689694 } ) ;
690695 } ) ;
0 commit comments