Skip to content

Commit 1705ced

Browse files
committed
1 parent e81b5f9 commit 1705ced

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/help.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,27 @@ describe('help options', function () {
238238
}
239239
});
240240
});
241+
242+
it('handles post with no body', function (done) {
243+
var spec = {
244+
paths: {
245+
'/foo': {
246+
post: {
247+
tags: [ 'test' ],
248+
operationId: 'sample'
249+
}
250+
}
251+
}
252+
};
253+
254+
var client = new SwaggerClient({
255+
url: 'http://localhost:8080/petstore.yaml',
256+
spec: spec,
257+
success: function () {
258+
var msg = client.test.sample.asCurl({});
259+
expect(msg).toBe("curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8080/foo'");
260+
done();
261+
}
262+
});
263+
});
241264
});

0 commit comments

Comments
 (0)