File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,38 @@ describe('help options', function () {
262262 } ) ;
263263 } ) ;
264264
265- it ( 'handles delete form' , function ( done ) {
265+ it ( 'handles delete form with parameters' , function ( done ) {
266+ var spec = {
267+ paths : {
268+ '/foo' : {
269+ delete : {
270+ tags : [ 'test' ] ,
271+ operationId : 'sample' ,
272+ consumes : [ 'application/x-www-form-urlencoded' ] ,
273+ parameters : [
274+ {
275+ in : 'formData' ,
276+ name : 'name' ,
277+ type : 'string'
278+ }
279+ ]
280+ }
281+ }
282+ }
283+ } ;
284+
285+ var client = new SwaggerClient ( {
286+ url : 'http://localhost:8080/petstore.yaml' ,
287+ spec : spec ,
288+ success : function ( ) {
289+ var msg = client . test . sample . asCurl ( { name : 'fred' } ) ;
290+ expect ( msg ) . toBe ( "curl -X DELETE --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'name=fred' 'http://localhost:8080/foo'" ) ;
291+ done ( ) ;
292+ }
293+ } ) ;
294+ } ) ;
295+
296+ it ( 'handles delete form with no parameters' , function ( done ) {
266297 var spec = {
267298 paths : {
268299 '/foo' : {
You can’t perform that action at this time.
0 commit comments