@@ -739,7 +739,7 @@ describe "api", ->
739739 done ()
740740 it " by public id" , (done )->
741741 @ timeout helper .TIMEOUT_LONG
742- cloudinary .v2 .api .publish_by_ids [publishTestId], (error , result )->
742+ cloudinary .v2 .api .publish_by_ids [publishTestId], type : " authenticated " , (error , result )->
743743 return done (new Error error .message ) if error?
744744 published = result .published
745745 expect (published).not .to .be (null )
@@ -767,6 +767,15 @@ describe "api", ->
767767 expect (published[0 ].public_id ).to .eql (publishTestId)
768768 expect (published[0 ].url ).to .match (/ \/ upload\/ / )
769769 done ()
770+ context " error" , ->
771+ it " shoule return empty due to wrong type given" , (done )->
772+ @ timeout helper .TIMEOUT_LONG
773+ cloudinary .v2 .api .publish_by_ids [publishTestId], type : " private" , (error , result )->
774+ return done (new Error error .message ) if error?
775+ published = result .published
776+ expect (published).not .to .be (null )
777+ expect (published .length ).to .be (0 )
778+ done ()
770779 describe " access_mode" , ->
771780 i = 0
772781 @ timeout helper .TIMEOUT_LONG
0 commit comments