@@ -654,6 +654,7 @@ describe("api", function () {
654654 colors : true ,
655655 unsigned : true ,
656656 disallow_public_id : true ,
657+ live : true
657658 } ) ;
658659 var expectedPath = "/.*\/upload_presets/" + API_TEST_UPLOAD_PRESET3 + "$" ;
659660 sinon . assert . calledWith ( request , sinon . match ( {
@@ -663,6 +664,19 @@ describe("api", function () {
663664 sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'colors' , 1 , "colors=1" ) ) ) ;
664665 sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'unsigned' , true , "unsigned=true" ) ) ) ;
665666 sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'disallow_public_id' , true , "disallow_public_id=true" ) ) ) ;
667+ sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'live' , true , "live=true" ) ) ) ;
668+ } ) ;
669+ } ) ;
670+ it ( "should allow creating upload_presets" , function ( ) {
671+ return helper . mockPromise ( function ( xhr , write ) {
672+ cloudinary . v2 . api . create_upload_preset ( {
673+ folder : "upload_folder" ,
674+ unsigned : true ,
675+ tags : UPLOAD_TAGS ,
676+ live : true
677+ } ) ;
678+ sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'unsigned' , true , "unsigned=true" ) ) ) ;
679+ sinon . assert . calledWith ( write , sinon . match ( helper . apiParamMatcher ( 'live' , true , "live=true" ) ) ) ;
666680 } ) ;
667681 } ) ;
668682 } ) ;
0 commit comments