diff --git a/test/test-post.js b/test/test-post.js index 32d12e4..71f87e2 100644 --- a/test/test-post.js +++ b/test/test-post.js @@ -11,6 +11,10 @@ s.on('/', function (req, res) { req.pipe(res); }); +s.on('/empty', function (req, res) { + res.end(); +}); + tape('setup', function (t) { s.listen(s.port, function () { t.end(); @@ -33,6 +37,13 @@ tape('send data from options with post request', function (t) { }); }); +tape('works with empty post response', function (t) { + got(s.url + '/empty', {body: 'wow'}, function (err, data) { + t.equal(data, ''); + t.end(); + }); +}); + tape('return writeable stream', function (t) { got.post(s.url) .on('data', function (data) {