test for form-data content-length hack

This commit is contained in:
David Frank 2016-03-19 15:51:48 +08:00
parent dec9c7bda6
commit 85c18162ac
1 changed files with 2 additions and 0 deletions

View File

@ -524,6 +524,7 @@ describe('node-fetch', function() {
}).then(function(res) {
expect(res.method).to.equal('POST');
expect(res.headers['content-type']).to.contain('multipart/form-data');
expect(res.headers['content-length']).to.be.a('string');
expect(res.body).to.equal('a=1');
});
});
@ -546,6 +547,7 @@ describe('node-fetch', function() {
}).then(function(res) {
expect(res.method).to.equal('POST');
expect(res.headers['content-type']).to.contain('multipart/form-data');
expect(res.headers['content-length']).to.be.a('string');
expect(res.headers.b).to.equal('2');
expect(res.body).to.equal('a=1');
});