We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e81b5f9 commit 1705cedCopy full SHA for 1705ced
test/help.js
@@ -238,4 +238,27 @@ describe('help options', function () {
238
}
239
});
240
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
264
0 commit comments