File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -728,10 +728,13 @@ describe("api", function () {
728728 xhr . restore ( ) ;
729729 } ) ;
730730 it ( "should support changing moderation status with notification-url" , function ( ) {
731- return cloudinary . v2 . api . update ( "sample" , {
731+ this . timeout ( helper . TIMEOUT_LONG ) ;
732+ return cloudinary . v2 . uploader . upload ( IMAGE_FILE , {
733+ moderation : "manual" ,
734+ } ) . then ( upload_result => cloudinary . v2 . api . update ( upload_result . public_id , {
732735 moderation_status : "approved" ,
733736 notification_url : "http://example.com" ,
734- } ) . then ( function ( ) {
737+ } ) ) . then ( function ( ) {
735738 if ( writeSpy . called ) {
736739 sinon . assert . calledWith ( writeSpy , sinon . match ( / n o t i f i c a t i o n _ u r l = h t t p % 3 A % 2 F % 2 F e x a m p l e .c o m / ) ) ;
737740 sinon . assert . calledWith ( writeSpy , sinon . match ( / m o d e r a t i o n _ s t a t u s = a p p r o v e d / ) ) ;
You can’t perform that action at this time.
0 commit comments