@@ -843,6 +843,28 @@ describe("utils", function () {
843843 } ) ;
844844 expect ( url ) . to . eql ( "http://res.cloudinary.com/test123/image/upload/if_w_lt_200,c_fill,h_120,w_80/sample" ) ;
845845 } ) ;
846+ describe ( 'conditional duration video' , function ( ) {
847+ it ( "should include conditional transformation" , function ( ) {
848+ var url = utils . url ( "test" , {
849+ resource_type : 'video' ,
850+ if : "duration > 30" ,
851+ width : 100 ,
852+ } ) ;
853+ expect ( url ) . to . eql ( "http://res.cloudinary.com/test123/video/upload/if_du_gt_30,w_100/test" ) ;
854+ url = utils . url ( "test" , {
855+ resource_type : 'video' ,
856+ if : "initialDuration > 30" ,
857+ width : 100 ,
858+ } ) ;
859+ expect ( url ) . to . eql ( "http://res.cloudinary.com/test123/video/upload/if_idu_gt_30,w_100/test" ) ;
860+ url = utils . url ( "test" , {
861+ resource_type : 'video' ,
862+ if : "initial_duration > 30" ,
863+ width : 100 ,
864+ } ) ;
865+ expect ( url ) . to . eql ( "http://res.cloudinary.com/test123/video/upload/if_idu_gt_30,w_100/test" ) ;
866+ } ) ;
867+ } ) ;
846868 it ( "should allow multiple conditions when chaining transformations " , function ( ) {
847869 var url = utils . url ( "sample" , {
848870 transformation : [
0 commit comments